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:
parent
2ed1e8b8e7
commit
48d481b5d3
2
NEWS.rst
2
NEWS.rst
@ -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
|
||||
==============================
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user