From bb2b868aaf19857e85eddb1b1500e417a1a4ccbf Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 23 Jan 2014 20:03:01 +0100 Subject: [PATCH] Make empty macroexpansions do the right thing --- hy/compiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index 93e6526..28fb57c 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -1645,15 +1645,15 @@ class HyASTCompiler(object): @builds(HyExpression) def compile_expression(self, expression): - if expression == []: - return self.compile_list(expression) - # Perform macro expansions expression = macroexpand(expression, self.module_name) if not isinstance(expression, HyExpression): # Go through compile again if the type changed. return self.compile(expression) + if expression == []: + return self.compile_list(expression) + fn = expression[0] func = None if isinstance(fn, HyKeyword):