Merge pull request #78 from paultag/paultag/bugfix/anon-macros

Paultag/bugfix/anon macros
This commit is contained in:
Julien Danjou 2013-04-07 15:40:52 -07:00
commit c3cbceca36
2 changed files with 11 additions and 3 deletions

View File

@ -31,9 +31,12 @@ MACROS = [
def process(tree):
load_macros()
tree = mprocess(tree)
for m in hy.mangle.MANGLES:
m().mangle(tree)
old = None
while old != tree:
old = tree
tree = mprocess(tree)
for m in hy.mangle.MANGLES:
m().mangle(tree)
return tree

View File

@ -377,6 +377,11 @@
(assert (= true (if true true true))))
(defn test-nested-mangles []
"NATIVE: test that we can use macros in mangled code"
(assert (= ((fn [] (-> 2 (+ 1 1) (* 1 2)))) 8)))
(defn test-let-scope []
"NATIVE: test let works rightish"
(setv y 123)