AST node representing a known constant (e.g. More...
Public Member Functions | |
__construct ($value) | |
Constructor. More... | |
getName () | |
Returns the name of the constant. More... | |
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 | |
Name of the constant, e.g. 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 known constant (e.g.
pi, e)
MathParser\Parsing\Nodes\ConstantNode::__construct | ( | $value | ) |
Constructor.
MathParser\Parsing\Nodes\ConstantNode::compareTo | ( | $other | ) |
Implementing the compareTo abstract method.
MathParser\Parsing\Nodes\ConstantNode::getName | ( | ) |
Returns the name of the constant.
string |
|
private |
Name of the constant, e.g.
'pi' or 'e'.
string $value