2using System.Threading.Tasks;
132 if (LeftChildren.Count == RightChildren.Count)
135 IEnumerator<IElement> eLeft = LeftChildren.GetEnumerator();
136 IEnumerator<IElement> eRight = RightChildren.GetEnumerator();
140 while (eLeft.MoveNext() && eRight.MoveNext())
155 foreach (
IElement LeftChild
in LeftChildren)
159 foreach (
IElement RightChild
in RightChildren)
162 LeftResult.Add(Right.
Encapsulate(RightResult,
this));
225 if (LeftChildren.Count == RightChildren.Count)
228 IEnumerator<IElement> eLeft = LeftChildren.GetEnumerator();
229 IEnumerator<IElement> eRight = RightChildren.GetEnumerator();
233 while (eLeft.MoveNext() && eRight.MoveNext())
248 foreach (
IElement LeftChild
in LeftChildren)
252 foreach (
IElement RightChild
in RightChildren)
255 LeftResult.Add(Right.
Encapsulate(RightResult,
this));
A chunked list is a linked list of chunks of objects of type T .
void Add(T Item)
Adds an item to the collection.
Script runtime exception.
Class managing a script expression.
static bool UpgradeField(ref IElement E1, ref ISet Set1, ref IElement E2, ref ISet Set2)
Upgrades elements if necessary, to a common field extension, trying to make them compatible....
Base class for all binary operators.
ScriptNode right
Right operand.
ScriptNode left
Left operand.
bool isAsync
If subtree is asynchroneous.
Base class for binary scalar operators.
BinaryScalarOperator(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Base class for binary scalar operators.
virtual Task< IElement > EvaluateScalarAsync(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
virtual async Task< IElement > EvaluateAsync(IElement Left, IElement Right, Variables Variables)
Evaluates the operator.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
abstract IElement EvaluateScalar(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
virtual UpgradeBehaviour ScalarUpgradeBehaviour
How scalar operands of different types are to be treated. By default, scalar operands are required to...
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
virtual IElement Evaluate(IElement Left, IElement Right, Variables Variables)
Evaluates the operator.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
int Start
Start position in script expression.
abstract IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
virtual Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Basic interface for all types of elements.
ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
ISet AssociatedSet
Associated Set.
IElement Encapsulate(ChunkedList< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
bool IsScalar
If the element represents a scalar value.
Basic interface for all types of sets.
UpgradeBehaviour
How operands are to be handled if not of the same type.