blob: ad8317cd67d12602a23e665d889d65dcd11f9ec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
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
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
ESeq exprs -> failure x
|