Inheritance diagram for stx::Grammar::PNUnaryArithmExpr:
Public Member Functions | |
PNUnaryArithmExpr (const ParseNode *_operand, char _op) | |
Constructor from the parser: operand subnode and operator id. | |
virtual | ~PNUnaryArithmExpr () |
Recursively delete the parse tree. | |
virtual AnyScalar | evaluate (const class SymbolTable &st) const |
Applies the operator to the recursively calculated value. | |
virtual bool | evaluate_const (AnyScalar *dest) const |
Calculates subnodes and returns result if the operator can be applied. | |
virtual std::string | toString () const |
Return the subnode's string with this operator prepended. | |
Private Attributes | |
const ParseNode * | operand |
Pointer to the single operand. | |
char | op |
Arithmetic operation to perform: either '+', '-' or '!'. |
This node has one child.
Definition at line 463 of file ExpressionParser.cc.
char stx::Grammar::PNUnaryArithmExpr::op [private] |
Arithmetic operation to perform: either '+', '-' or '!'.
Further optimization would be to create an extra class for each op
Definition at line 471 of file ExpressionParser.cc.
Referenced by evaluate(), evaluate_const(), PNUnaryArithmExpr(), and toString().