python: remove extraneous macroexpand call.
authorJoel Martin <github@martintribe.org>
Wed, 20 Sep 2017 03:05:03 +0000 (22:05 -0500)
committerJoel Martin <github@martintribe.org>
Thu, 21 Sep 2017 22:35:38 +0000 (17:35 -0500)
python/step8_macros.py
python/step9_try.py
python/stepA_mal.py

index 016aae8..cdf7969 100644 (file)
@@ -37,7 +37,7 @@ def is_macro_call(ast, env):
 def macroexpand(ast, env):
     while is_macro_call(ast, env):
         mac = env.get(ast[0])
-        ast = macroexpand(mac(*ast[1:]), env)
+        ast = mac(*ast[1:])
     return ast
 
 def eval_ast(ast, env):
index 9cebe9c..80b7f5d 100644 (file)
@@ -37,7 +37,7 @@ def is_macro_call(ast, env):
 def macroexpand(ast, env):
     while is_macro_call(ast, env):
         mac = env.get(ast[0])
-        ast = macroexpand(mac(*ast[1:]), env)
+        ast = mac(*ast[1:])
     return ast
 
 def eval_ast(ast, env):
index 6f2f6da..2da3f71 100644 (file)
@@ -37,7 +37,7 @@ def is_macro_call(ast, env):
 def macroexpand(ast, env):
     while is_macro_call(ast, env):
         mac = env.get(ast[0])
-        ast = macroexpand(mac(*ast[1:]), env)
+        ast = mac(*ast[1:])
     return ast
 
 def eval_ast(ast, env):