Inheritance diagram for CCM::Expr:
If an expression contains stub property accesses or stub method calls, there are several possible results which must be iterated through in the caller.
Public Member Functions | |
abstract Object | eval () |
Evaluate expression and return its value. | |
abstract Type | type () |
Return the expression type. | |
bool | assignable () |
Return whether this is an assignable expression (array element or ID). | |
Ref | getRef () |
Return the referred identifier for reference expressions. | |
bool | isElementAccess () |
Return whether this is an element access expression. | |
abstract Expr | makeElementAssign (Expr value) |
Return an expression that assigns value to the element if called on an array element access expression. | |
Protected Member Functions | |
Object | doCall () |
Call method and return its value (for a method call expression). | |
Object | doElemAccess () |
Return the array element for an element expression. | |
Object | doElemAssignment () |
Execute assignmet for an array element assignment expression. | |
Protected Attributes | |
Ref | id |
Reference for a variable/stub property reference expressions. | |
Expr | left |
Left subexpression for binary expressions, subexpression for unary expressions. | |
Expr | right |
Right subexpression for binary expressions, unused for unary expressions. | |
IntExpr | index |
Element index for array element access expressions. | |
List | callargs |
Argument list for method call expressions (of Expr). |
|
Return whether this is an assignable expression (array element or ID).
|
|
Call method and return its value (for a method call expression). Common for all expression types. |
|
Return the array element for an element expression. Common for all expression types. |
|
Execute assignmet for an array element assignment expression. Common for all expression types. |
|
Evaluate expression and return its value. Stub access expressions add transitions to the currently evaluated process. Implemented in CCM::NullExpr, CCM::BoolExpr, CCM::IntExpr, CCM::FloatExpr, CCM::StringExpr, CCM::ArrayExpr, CCM::StubExpr, CCM::ThisExpr, and CCM::VoidExpr. |
|
Return the referred identifier for reference expressions.
|
|
Return whether this is an element access expression.
|
|
Return an expression that assigns value to the element if called on an array element access expression.
Implemented in CCM::NullExpr, CCM::BoolExpr, CCM::IntExpr, CCM::FloatExpr, CCM::StringExpr, CCM::ArrayExpr, CCM::StubExpr, CCM::ThisExpr, and CCM::VoidExpr. |
|
Return the expression type. This is generally the type of the expression value, not of the Expr itself (e. g. "int", not "IntExpr"). Implemented in CCM::NullExpr, CCM::BoolExpr, CCM::IntExpr, CCM::FloatExpr, CCM::StringExpr, CCM::ArrayExpr, CCM::StubExpr, CCM::ThisExpr, and CCM::VoidExpr. |
|
Argument list for method call expressions (of Expr).
|
|
Reference for a variable/stub property reference expressions.
|
|
Element index for array element access expressions.
|
|
Left subexpression for binary expressions, subexpression for unary expressions.
|
|
Right subexpression for binary expressions, unused for unary expressions.
|