From 055c0d0d5a5bb0dc75904fe53df7f2e4f5732a8f Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 21 May 2008 09:26:44 +0000 Subject: GF/src is now for 2.9, and the new sources are in src-3.0 - keep it this way until the release of GF 3 --- src-3.0/GF/JavaScript/SkelJS.hs | 80 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src-3.0/GF/JavaScript/SkelJS.hs (limited to 'src-3.0/GF/JavaScript/SkelJS.hs') diff --git a/src-3.0/GF/JavaScript/SkelJS.hs b/src-3.0/GF/JavaScript/SkelJS.hs new file mode 100644 index 000000000..f8cd588a7 --- /dev/null +++ b/src-3.0/GF/JavaScript/SkelJS.hs @@ -0,0 +1,80 @@ +module GF.JavaScript.SkelJS where + +-- Haskell module generated by the BNF converter + +import GF.JavaScript.AbsJS +import GF.Data.ErrM +type Result = Err String + +failure :: Show a => a -> Result +failure x = Bad $ "Undefined case: " ++ show x + +transIdent :: Ident -> Result +transIdent x = case x of + Ident str -> failure x + + +transProgram :: Program -> Result +transProgram x = case x of + Program elements -> failure x + + +transElement :: Element -> Result +transElement x = case x of + FunDef id ids stmts -> failure x + ElStmt stmt -> failure x + + +transStmt :: Stmt -> Result +transStmt x = case x of + SCompound stmts -> failure x + SReturnVoid -> failure x + SReturn expr -> failure x + SDeclOrExpr declorexpr -> failure x + + +transDeclOrExpr :: DeclOrExpr -> Result +transDeclOrExpr x = case x of + Decl declvars -> failure x + DExpr expr -> failure x + + +transDeclVar :: DeclVar -> Result +transDeclVar x = case x of + DVar id -> failure x + DInit id expr -> failure x + + +transExpr :: Expr -> Result +transExpr x = case x of + EAssign expr0 expr -> failure x + ENew id exprs -> failure x + EMember expr id -> failure x + EIndex expr0 expr -> failure x + ECall expr exprs -> failure x + EVar id -> failure x + EInt n -> failure x + EDbl d -> failure x + EStr str -> failure x + ETrue -> failure x + EFalse -> failure x + ENull -> failure x + EThis -> failure x + EFun ids stmts -> failure x + EArray exprs -> failure x + EObj propertys -> failure x + ESeq exprs -> failure x + + +transProperty :: Property -> Result +transProperty x = case x of + Prop propertyname expr -> failure x + + +transPropertyName :: PropertyName -> Result +transPropertyName x = case x of + IdentPropName id -> failure x + StringPropName str -> failure x + + + -- cgit v1.2.3