69 bool RecalcIsAsync =
false;
72 if (!(this.
left is
null))
74 b = !Callback(this.
left, out NewNode, State);
75 if (!(NewNode is
null))
83 if (b || (Order ==
SearchMethod.TreeOrder && !
this.left.ForAllChildNodes(Callback, State, Order)))
92 if (!(this.middle is
null))
94 b = !Callback(this.middle, out NewNode, State);
95 if (!(NewNode is
null))
97 this.middle = NewNode;
100 RecalcIsAsync =
true;
103 if (b || (Order ==
SearchMethod.TreeOrder && !
this.middle.ForAllChildNodes(Callback, State, Order)))
112 if (!(this.
right is
null))
114 b = !Callback(this.
right, out NewNode, State);
115 if (!(NewNode is
null))
117 this.right = NewNode;
120 RecalcIsAsync =
true;
123 if (b || (Order ==
SearchMethod.TreeOrder && !
this.right.ForAllChildNodes(Callback, State, Order)))
161 int Result = base.GetHashCode();
Class managing a script expression.
Base class for all binary operators.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
ScriptNode right
Right operand.
ScriptNode left
Left operand.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
static bool AreEqual(ScriptNode S1, ScriptNode S2)
Compares if two script nodes are equal.
int Start
Start position in script expression.
virtual bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
void SetParent(ScriptNode Parent)
Sets the parent node. Can only be used when expression is being parsed.
Base class for all ternary operators.
TernaryOperator(ScriptNode Left, ScriptNode Middle, ScriptNode Right, int Start, int Length, Expression Expression)
Base class for all ternary operators.
override void CalcIsAsync()
Recalculates if operator is asynchronous or not.
override bool Equals(object obj)
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
override int GetHashCode()
ScriptNode middle
Middle operand.
ScriptNode MiddleOperand
Middle operand.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure