1using System.Collections.Generic;
2using System.Threading.Tasks;
107 LinkedList<IElement> Result =
new LinkedList<IElement>();
119 LinkedList<IElement> Result =
new LinkedList<IElement>();
131 if (LeftChildren.Count == RightChildren.Count)
133 LinkedList<IElement> Result =
new LinkedList<IElement>();
134 IEnumerator<IElement> eLeft = LeftChildren.GetEnumerator();
135 IEnumerator<IElement> eRight = RightChildren.GetEnumerator();
139 while (eLeft.MoveNext() && eRight.MoveNext())
152 LinkedList<IElement> LeftResult =
new LinkedList<IElement>();
154 foreach (
IElement LeftChild
in LeftChildren)
156 LinkedList<IElement> RightResult =
new LinkedList<IElement>();
158 foreach (
IElement RightChild
in RightChildren)
161 LeftResult.AddLast(Right.
Encapsulate(RightResult,
this));
200 LinkedList<IElement> Result =
new LinkedList<IElement>();
212 LinkedList<IElement> Result =
new LinkedList<IElement>();
224 if (LeftChildren.Count == RightChildren.Count)
226 LinkedList<IElement> Result =
new LinkedList<IElement>();
227 IEnumerator<IElement> eLeft = LeftChildren.GetEnumerator();
228 IEnumerator<IElement> eRight = RightChildren.GetEnumerator();
232 while (eLeft.MoveNext() && eRight.MoveNext())
245 LinkedList<IElement> LeftResult =
new LinkedList<IElement>();
247 foreach (
IElement LeftChild
in LeftChildren)
249 LinkedList<IElement> RightResult =
new LinkedList<IElement>();
251 foreach (
IElement RightChild
in RightChildren)
254 LeftResult.AddLast(Right.
Encapsulate(RightResult,
this));
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.
IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
ISet AssociatedSet
Associated Set.
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.