From 4ffe20e8530104c9a201b8140acc9111c453b76a Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 11 May 2013 19:40:27 +0200 Subject: [PATCH] eval macros at compile time --- hy/compiler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hy/compiler.py b/hy/compiler.py index 7602b30..f876d87 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -35,6 +35,7 @@ from hy.models.float import HyFloat from hy.models.list import HyList from hy.models.dict import HyDict +import hy.importer from hy.core import process from hy.util import str_type @@ -1616,6 +1617,8 @@ class HyASTCompiler(object): ]), ]).replace(expression) + hy.importer.hy_eval(new_expression, {}) + return self.compile(new_expression) @builds(HyInteger)