Fix a check for empty input in `macroexpand`

The equality check hasn't done the right thing since HyExpression became tuple-backed (#1804).
This commit is contained in:
Kodi Arfer 2020-03-20 12:56:49 -04:00
parent 2ed1e8b8e7
commit 48d481b5d3
2 changed files with 3 additions and 4 deletions

View File

@ -13,6 +13,8 @@ Bug Fixes
* Improved support for nesting anaphoric macros by only applying
symbol replacement where absolutely necessary.
* Quoted f-strings are no longer evaluated prematurely.
* Fixed a regression in the production of error messages for empty
expressions.
0.18.0
==============================

View File

@ -308,10 +308,7 @@ def macroexpand(tree, module, compiler=None, once=False):
assert not compiler or compiler.module == module
while True:
if not isinstance(tree, HyExpression) or tree == []:
break
while isinstance(tree, HyExpression) and tree:
fn = tree[0]
if fn in ("quote", "quasiquote") or not isinstance(fn, HySymbol):