abstract class compilerEs::JsNode

sys::Obj
  compilerEs::JsNode

Source

JsNode

c

Compiler c()

Source

checkJsSafety

Bool checkJsSafety(CType ctype, Loc? loc)

Source

curType

TypeDef? curType()

Source

err

CompilerErr err(Str msg, Loc? loc := null)

Source

fieldToJs

static Str fieldToJs(Obj name)

Source

Get the name that should be used for the generated field in JS code. A field is always private so we do not need to swizzle its name.

isJsType

Bool isJsType(TypeDef def)

Source

isPrimitive

Bool isPrimitive(CType ctype)

Source

js

JsWriter js()

Source

loc

virtual Loc? loc()

Source

make

new make(CompileEsPlugin plugin, Node? node := null)

Source

methodParams

Str methodParams(CParam[] params)

Source

generates (p1, p2, ...pn)

methodToJs

static Str methodToJs(Str name)

Source

Get the name that should be used for the generated method in JS code. It turns out we don't need to swizzle method names.

nameToJs

Str nameToJs(Str name)

Source

Return the JS identifier name to use for the given Fantom name. This should be used to get names for local variable declarations and method/func parameters.

Note - use fieldJs for generating field names since we have a lot of special handling for fields Note - use methodJs for generating method names

node

virtual Node? node()

Source

plugin

CompileEsPlugin plugin { private set }

Source

pmap

const Str:Bool pmap := ...

Source

qnameToJs

Str qnameToJs(CType ctype)

Source

Get the module-qualified name for this CType. If the type is in the this pod, it does not need to be qualified

resolveType

CType resolveType(CType ctype)

Source

toLoc

static Loc? toLoc(Obj obj)

Source

uniqName

Str uniqName(Str name := "u")

Source

return a unique id name

warn

CompilerErr warn(Str msg, Loc? loc := null)

Source

write

abstract Void write()

Source

writeBlock

Void writeBlock(Block? block)

Source

writeExpr

Void writeExpr(Expr? expr)

Source

writeStmt

Void writeStmt(Stmt? stmt)

Source