AST node representing a subexpression. More...
Public Member Functions | |
__construct ($value) | |
Constructor. More... | |
getValue () | |
Returns the value. More... | |
getOperator () | |
accept (Visitor $visitor) | |
Implementing the Visitable interface. | |
compareTo ($other) | |
Implementing the compareTo abstract method. More... | |
![]() | |
compareTo ($other) | |
Helper function, comparing two ASTs. More... | |
evaluate ($variables) | |
Convenience function for evaluating a tree, using the Evaluator class. More... | |
complexity () | |
Rough estimate of the complexity of the AST. More... | |
isTerminal () | |
Returns true if the node is a terminal node, i.e. More... | |
getOperator () | |
__toString () | |
Private Attributes | |
$value | |
string $value Dummy value usually '('. More... | |
Additional Inherited Members | |
![]() | |
static | rationalFactory (Token $token) |
Node factory, creating an appropriate Node from a Token. More... | |
static | factory (Token $token) |
Node factory, creating an appropriate Node from a Token. More... | |
![]() | |
const | NumericInteger = 1 |
const | NumericRational = 2 |
const | NumericFloat = 3 |
AST node representing a subexpression.
Only for temporary use in the parser.
MathParser\Parsing\Nodes\SubExpressionNode::__construct | ( | $value | ) |
Constructor.
Create a SubExpressionNode with given value.
MathParser\Parsing\Nodes\SubExpressionNode::compareTo | ( | $other | ) |
Implementing the compareTo abstract method.
MathParser\Parsing\Nodes\SubExpressionNode::getValue | ( | ) |
Returns the value.
int|float |
|
private |
string $value Dummy value usually '('.
A temporary SubExpressionNode is generated by the parser when encountering a parenthesized subexpression.