Expr
Slots
- asTableSwitchCaseSource
-
virtual 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
- assignRequiresTempVarSource
-
virtual Bool assignRequiresTempVar()
Assignments to instance fields require a temporary local variable.
- commonTypeSource
-
static CType commonType(CNamespace ns, Expr[] exprs)
Given a list of Expr instances, find the common base type they all share. This method does not take into account the null literal. It is used for type inference for lists and maps.
- ctypeSource
-
CType? ctype
- ctypesSource
-
static CType[] ctypes(Expr[] exprs)
Map the list of expressions into their list of types
- idSource
-
readonly ExprId id
- isAssignableSource
-
virtual Bool isAssignable()
Return if this expression can be used as the left hand side of an assignment expression.
- isCondSource
-
virtual Bool isCond()
Is this a boolean conditional (boolOr/boolAnd)
- isStmtSource
-
virtual Bool isStmt()
Does this expression make up a complete statement. If you override this to true, then you must make sure the expr is popped in CodeAsm.
- leaveSource
-
Bool leave := true { protected set }
- makeSource
- noLeaveSource
-
Expr noLeave()
Set this expression to not be left on the stack.
- printSource
-
override Void print(AstWriter out)
Overrides compiler::Node.print
Doc inherited from compiler::Node.print
Pretty print this node and it's descendants.
- serializeSource
-
virtual Str serialize()
Return this expression as serialization text or throw exception if not serializable.
- toDocStrSource
-
Str toDocStr()
Get this expression as a string suitable for documentation.
- toStmtSource
-
ExprStmt toStmt()
Return this expression as an ExprStmt
- toStrSource
-
abstract Str toStr()
Overrides sys::Obj.toStr
Doc inherited from sys::Obj.toStr
Return a string representation of this object.
- toTypeStrSource
-
Str toTypeStr()
Get this expression's type as a string for error reporting.
- walkSource
- walkChildrenSource
- walkExprSource
- walkExprsSource