28 this.middle2 = Middle2;
43 (this.
right?.IsAsynchronous ??
false);
76 bool RecalcIsAsync =
false;
79 if (!(this.
left is
null))
81 b = !Callback(this.
left, out NewNode, State);
82 if (!(NewNode is
null))
90 if (b || (Order ==
SearchMethod.TreeOrder && !
this.left.ForAllChildNodes(Callback, State, Order)))
99 if (!(this.
middle is
null))
101 b = !Callback(this.
middle, out NewNode, State);
102 if (!(NewNode is
null))
104 this.middle = NewNode;
107 RecalcIsAsync =
true;
110 if (b || (Order ==
SearchMethod.TreeOrder && !
this.middle.ForAllChildNodes(Callback, State, Order)))
119 if (!(this.middle2 is
null))
121 b = !Callback(this.middle2, out NewNode, State);
122 if (!(NewNode is
null))
124 this.middle2 = NewNode;
127 RecalcIsAsync =
true;
130 if (b || (Order ==
SearchMethod.TreeOrder && !
this.middle2.ForAllChildNodes(Callback, State, Order)))
139 if (!(this.
right is
null))
141 b = !Callback(this.
right, out NewNode, State);
142 if (!(NewNode is
null))
144 this.right = NewNode;
147 RecalcIsAsync =
true;
150 if (b || (Order ==
SearchMethod.TreeOrder && !
this.right.ForAllChildNodes(Callback, State, Order)))
184 AreEqual(this.middle2, O.middle2) &&
191 int Result = base.GetHashCode();
Class managing a script expression.
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 quaternary operators.
override void CalcIsAsync()
Recalculates if operator is asynchronous or not.
override int GetHashCode()
ScriptNode Middle2Operand
Second middle operand.
ScriptNode middle2
Second Middle operand.
QuaternaryOperator(ScriptNode Left, ScriptNode Middle1, ScriptNode Middle2, ScriptNode Right, int Start, int Length, Expression Expression)
Base class for all quaternary operators.
override bool Equals(object obj)
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
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.
ScriptNode middle
Middle operand.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure