78 while (current !=
nullptr)
89 if (rdepth - pdepth > 1 || rdepth - pdepth < -1)
virtual ReductionType GetReductionType()
virtual ReductionType GetReductionType()
virtual void Detach(SyntaxNode *node)=0
virtual void Attach(SyntaxNode *node)=0
Base class for all nodes in a syntax tree.
NumericValueNode(Number *value)
virtual void Replace(SyntaxNode *n, SyntaxNode *x)=0
Optimizer(SyntaxNode *root)
virtual Number * Unary()=0
static void ReduceUnaryNodes(SyntaxNode *node)
void SetParent(SyntaxNode *node)
virtual void ResetIterator()
virtual NodeType GetNodeType()=0
static void BalanceTree(SyntaxNode *node)
static void TagStartNode(SyntaxNode *node)
void ReplaceWith(Number *value)
static void ReduceValueNodes(SyntaxNode *node)
SyntaxNode * GetRoot() const
SyntaxNode * GetParent() const
virtual Number * Sub(Number *other)=0
virtual int GetPrecedence()=0
virtual Number * Add(Number *other)=0
Use of a numeric value in a syntax tree.
virtual SyntaxNode * GetNext()=0
Base class for all nodes related to mathematical expressions.
virtual bool PureComplexValue()=0
static int GetTreeDepth(SyntaxNode *node, int depth)
static void TagChildren(SyntaxNode *node)