1
0
forked from GitHub/gf-core

Added the beginnings of GFCC to JavaScript conversion.

This commit is contained in:
bringert
2006-11-30 22:50:25 +00:00
parent 1e3ea113bb
commit ae188e067f
13 changed files with 2001 additions and 3 deletions

View File

@@ -0,0 +1,51 @@
module GF.JavaScript.SkelJS where
-- Haskell module generated by the BNF converter
import GF.JavaScript.AbsJS
import GF.JavaScript.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
Compound stmts -> failure x
ReturnVoid -> failure x
Return expr -> failure x
transExpr :: Expr -> Result
transExpr x = case x of
ENew id exprs -> failure x
EMember expr0 expr -> 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