1
0
forked from GitHub/gf-core

JavaSscript and SISR abstract syntax now uses an array for the node children, instead of cheesy argN fields.

This commit is contained in:
bringert
2007-01-07 17:18:50 +00:00
parent efb806f226
commit 37760cb24c

View File

@@ -82,7 +82,7 @@ field x y = JS.EMember x (JS.Ident y)
ass = JS.EAssign
tree n xs = obj $ [("name", JS.EStr n)] ++ [("arg"++show i, x) | (i,x) <- zip [0..] xs]
tree n xs = obj [("name", JS.EStr n), ("children", JS.EArray xs)]
obj ps = JS.EObj [JS.Prop (JS.Ident x) y | (x,y) <- ps]