Fantom

 

class

compiler::LiteralExpr

sys::Obj
  compiler::Node
    compiler::Expr
      compiler::LiteralExpr

LiteralExpr puts an Bool, Int, Float, Str, Duration, Uri, or null constant onto the stack.

Slots

asTableSwitchCaseSource

override Int? asTableSwitchCase()

Return this expression as an Int literal usable in a tableswitch, or null if this Expr doesn't represent a constant Int. Expressions which work as table switch cases: int literals and enum constants

makeSource

new make(Loc loc, ExprId id, CType ctype, Obj? val)

makeDefaultLiteralSource

static LiteralExpr makeDefaultLiteral(Loc loc, CNamespace ns, CType ctype)

makeFalseSource

new makeFalse(Loc loc, CNamespace ns)

makeNullSource

new makeNull(Loc loc, CNamespace ns)

makeTrueSource

new makeTrue(Loc loc, CNamespace ns)

serializeSource

override Str serialize()

Overrides compiler::Expr.serialize

Doc inherited from compiler::Expr.serialize

Return this expression as serialization text or throw exception if not serializable.

toStrSource

override Str toStr()

Overrides compiler::Expr.toStr

Doc inherited from sys::Obj.toStr

Return a string representation of this object.

valSource

Obj? val