class
compilerJavascript::JavascriptWriter
sys::Obj compiler::CompilerSupport compilerJavascript::JavascriptWriter
Generates a Javascript source file from a TypeDef AST.
Slots
- assignExprSource
-
Void assignExpr(BinaryExpr be)
- blockSource
-
Void block(Block block, Bool braces := true, Bool indent := true)
- callExprSource
- closureExprSource
-
Void closureExpr(ClosureExpr ce)
- closureLevelSource
-
Int closureLevel := 0
- condExprSource
- ctorSource
- ctorsSource
-
MethodDef[] ctors := [,]
- elvisExprSource
-
Void elvisExpr(BinaryExpr be)
- exprSource
- exprStmtSource
- fieldSource
- fieldExprSource
- forStmtSource
- ifStmtSource
- inClosureSource
-
Bool inClosure()
Return true if we are inside a closure.
- inStaticInitSource
-
Bool inStaticInit := false
- isObjMethodSource
- isPrimitiveSource
- listLiteralExprSource
-
Void listLiteralExpr(ListLiteralExpr le)
- localDefSource
-
Void localDef(LocalDefStmt lds)
- makeSource
-
new make(Compiler compiler, TypeDef typeDef, OutStream out)
Constructor takes the associated Compiler
- mapLiteralExprSource
-
Void mapLiteralExpr(MapLiteralExpr me)
- methodSource
- objMethodMapSource
- outSource
-
AstWriter out
- primitiveMapSource
- qnameSource
-
Return the Javascript qname for this TypeDef. The Javascript qname is <pod>_<type>:
foo::Bar -> foo_Bar
- rangeLiteralExprSource
-
Void rangeLiteralExpr(RangeLiteralExpr re)
- returnStmtSource
-
Void returnStmt(ReturnStmt rs)
- shortcutExprSource
-
Void shortcutExpr(ShortcutExpr se)
- staticFieldSource
- staticFieldsSource
-
FieldDef[] staticFields := [,]
- staticInitSource
- staticInitsSource
-
Block[] staticInits := [,]
- staticMethodSource
- staticMethodsSource
-
MethodDef[] staticMethods := [,]
- stmtSource
- switchStmtSource
-
Void switchStmt(SwitchStmt ss)
- throwStmtSource
- tryStmtSource
- typeCheckExprSource
-
Void typeCheckExpr(TypeCheckExpr te)
- typeDefSource
-
TypeDef typeDef
- varSource
- varsSource
- whileStmtSource
- withBlockExprSource
-
Void withBlockExpr(WithBlockExpr wbe)
- writeSource
-
Void write()