Make empty macroexpansions do the right thing
This commit is contained in:
parent
54757b8316
commit
bb2b868aaf
@ -1645,15 +1645,15 @@ class HyASTCompiler(object):
|
|||||||
|
|
||||||
@builds(HyExpression)
|
@builds(HyExpression)
|
||||||
def compile_expression(self, expression):
|
def compile_expression(self, expression):
|
||||||
if expression == []:
|
|
||||||
return self.compile_list(expression)
|
|
||||||
|
|
||||||
# Perform macro expansions
|
# Perform macro expansions
|
||||||
expression = macroexpand(expression, self.module_name)
|
expression = macroexpand(expression, self.module_name)
|
||||||
if not isinstance(expression, HyExpression):
|
if not isinstance(expression, HyExpression):
|
||||||
# Go through compile again if the type changed.
|
# Go through compile again if the type changed.
|
||||||
return self.compile(expression)
|
return self.compile(expression)
|
||||||
|
|
||||||
|
if expression == []:
|
||||||
|
return self.compile_list(expression)
|
||||||
|
|
||||||
fn = expression[0]
|
fn = expression[0]
|
||||||
func = None
|
func = None
|
||||||
if isinstance(fn, HyKeyword):
|
if isinstance(fn, HyKeyword):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user