module JavaScript: sig
.. end
Parser and printer for JavaScript
type
id = string
type
prefixOp = JavaScript_syntax.prefixOp
=
| |
PrefixLNot |
| |
PrefixBNot |
| |
PrefixPlus |
| |
PrefixMinus |
| |
PrefixTypeof |
| |
PrefixVoid |
| |
PrefixDelete |
type
unaryAssignOp = JavaScript_syntax.unaryAssignOp
=
| |
PrefixInc |
| |
PrefixDec |
| |
PostfixInc |
| |
PostfixDec |
type
infixOp = JavaScript_syntax.infixOp
=
| |
OpLT |
| |
OpLEq |
| |
OpGT |
| |
OpGEq |
| |
OpIn |
| |
OpInstanceof |
| |
OpEq |
| |
OpNEq |
| |
OpStrictEq |
| |
OpStrictNEq |
| |
OpLAnd |
| |
OpLOr |
| |
OpMul |
| |
OpDiv |
| |
OpMod |
| |
OpSub |
| |
OpLShift |
| |
OpSpRShift |
| |
OpZfRShift |
| |
OpBAnd |
| |
OpBXor |
| |
OpBOr |
| |
OpAdd |
type
assignOp = JavaScript_syntax.assignOp
=
| |
OpAssign |
| |
OpAssignAdd |
| |
OpAssignSub |
| |
OpAssignMul |
| |
OpAssignDiv |
| |
OpAssignMod |
| |
OpAssignLShift |
| |
OpAssignSpRShift |
| |
OpAssignZfRShift |
| |
OpAssignBAnd |
| |
OpAssignBXor |
| |
OpAssignBOr |
type
const = JavaScript_syntax.const
=
| |
CString of string |
| |
CRegexp of string * bool * bool |
| |
CNum of float |
| |
CInt of int |
| |
CBool of bool |
| |
CNull |
| |
CUndefined |
type
prop = JavaScript_syntax.prop
=
| |
PropId of id |
| |
PropString of string |
| |
PropNum of int |
type
varDecl = JavaScript_syntax.varDecl
=
| |
VarDeclNoInit of id |
| |
VarDecl of id * expr |
type
forInit = JavaScript_syntax.forInit
=
| |
NoForInit |
| |
VarForInit of varDecl list |
| |
ExprForInit of expr |
type
catch = JavaScript_syntax.catch
=
type
forInInit = JavaScript_syntax.forInInit
=
| |
VarForInInit of id |
| |
NoVarForInInit of id |
type
caseClause = JavaScript_syntax.caseClause
=
type
lvalue = JavaScript_syntax.lvalue
=
type
expr = JavaScript_syntax.expr
=
type
stmt = JavaScript_syntax.stmt
=
type
prog = JavaScript_syntax.prog
=
val from_string : string -> prog
val from_file : string -> prog
val show_expr : expr -> string
val show_stmt : stmt -> string
val show_prog : prog -> string