Fan

 

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()

Overrides compiler::Expr.asTableSwitchCase

Doc inherited from compiler::Expr.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(Location location, ExprId id, CType ctype, Obj? val)

makeForSource

static LiteralExpr makeFor(Location loc, CNamespace ns, Obj val)

makeNullLiteralSource

new makeNullLiteral(Location location, 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