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:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user