Fantom

 

abstract class

compilerJs::JsNode

sys::Obj
  compilerJs::JsNode

JsNode translates a compiler::Node into the equivalent JavaScript source code.

Slots

isPrimitiveSource

Bool isPrimitive(CType ctype)

Return true if the type is a primitive type:

  • Bool
  • Decimal
  • Float
  • Int
  • Num
  • Str
makeSource

new make(JsCompilerSupport support)

pmapSource

const Str:Bool pmap := ...

qnameToJsSource

Str qnameToJs(CType ctype)

Return the JavaScript qname for this CType.

supportSource

JsCompilerSupport support

vnameToJsSource

Str vnameToJs(Str name)

Return the JavaScript variable name for the given Fan variable name.

writeSource

abstract Void write(JsWriter out)

Write the JavaScript source code for this node.