diff --git a/NEWS.rst b/NEWS.rst index 7a523da..61d7dfc 100644 --- a/NEWS.rst +++ b/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 ============================== diff --git a/hy/macros.py b/hy/macros.py index 27a669c..cb8178e 100644 --- a/hy/macros.py +++ b/hy/macros.py @@ -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):