split the Exp type to Tree and Expr

This commit is contained in:
krasimir
2008-06-19 12:48:29 +00:00
parent 0442d67e8c
commit c0d22bec2d
23 changed files with 613 additions and 477 deletions

View File

@@ -31,7 +31,7 @@ pgf2js pgf =
abstract2js :: String -> Abstr -> JS.Expr
abstract2js start ds = new "GFAbstract" [JS.EStr start, JS.EObj $ map absdef2js (Map.assocs (funs ds))]
absdef2js :: (CId,(Type,Exp)) -> JS.Property
absdef2js :: (CId,(Type,Expr)) -> JS.Property
absdef2js (f,(typ,_)) =
let (args,cat) = M.catSkeleton typ in
JS.Prop (JS.IdentPropName (JS.Ident (prCId f))) (new "Type" [JS.EArray [JS.EStr (prCId x) | x <- args], JS.EStr (prCId cat)])