
Expr
Slots
- asTableSwitchCase
-
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
- assignRequiresTempVar
-
virtual Bool assignRequiresTempVar()
Assignments to instance fields require a temporary local variable.
- commonType
-
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.
- ctype
-
CType ctype
- ctypes
-
static CType[] ctypes(Expr[] exprs)
Map the list of expressions into their list of types
- fits
-
Return if this expression matches the expected type.
- id
-
readonly ExprId id
- isAssignable
-
virtual Bool isAssignable()
Return if this expression can be used as the left hand side of an assignment expression.
- isCond
-
virtual Bool isCond()
Is this a boolean conditional (boolOr/boolAnd)
- isStmt
-
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.
- leave
-
Bool leave := true { protected set }
- make
- noLeave
-
Expr noLeave()
Set this expression to not be left on the stack.
-
override Void print(AstWriter out)
Pretty print this node and it's descendants.
- serialize
-
virtual Str serialize()
Return this expression as serialization text or throw exception if not serializable.
- toDocStr
-
Str toDocStr()
Get this expression as a string suitable for documentation.
- toStmt
-
ExprStmt toStmt()
Return this expression as an ExprStmt
- toStr
-
abstract Str toStr()
Return a string representation of this object.
- walk
- walkChildren
- walkExpr
- walkExprs