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
- isAlwaysNullableSource
-
override Bool isAlwaysNullable()
Overrides compiler::Expr.isAlwaysNullable
Doc inherited from compiler::Expr.isAlwaysNullable
Return if this expression is guaranteed to sometimes return a null result (safe invoke, as, etc)
- makeSource
- makeDefaultLiteralSource
-
static LiteralExpr makeDefaultLiteral(Loc loc, CNamespace ns, CType ctype)
- makeFalseSource
-
new makeFalse(Loc loc, CNamespace ns)
- makeNullSource
-
new makeNull(Loc loc, CNamespace ns)
- makeStrSource
-
new makeStr(Loc loc, CNamespace ns, Str val)
- 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