2using System.Collections.Generic;
3using System.Threading.Tasks;
78 Result = RE.MultiplyLeft(Temp);
79 if (!(Result is
null))
83 if (!(Result is
null))
95 if (!LeftSet.Equals(RightSet))
101 if (!(LE is
null) && !(RE is
null))
106 Result = RE.MultiplyLeft(Temp);
107 if (!(Result is
null))
111 if (!(Result is
null))
119 if (!(Result is
null))
126 LinkedList<IElement> Elements =
new LinkedList<IElement>();
138 LinkedList<IElement> Elements =
new LinkedList<IElement>();
147 if (Left is
ISet Set1 && Right is
ISet Set2)
154 if (LeftChildren.Count == RightChildren.Count)
156 LinkedList<IElement> Elements =
new LinkedList<IElement>();
157 IEnumerator<IElement> eLeft = LeftChildren.GetEnumerator();
158 IEnumerator<IElement> eRight = RightChildren.GetEnumerator();
162 while (eLeft.MoveNext() && eRight.MoveNext())
175 LinkedList<IElement> LeftResult =
new LinkedList<IElement>();
177 foreach (
IElement LeftChild
in LeftChildren)
179 LinkedList<IElement> RightResult =
new LinkedList<IElement>();
181 foreach (
IElement RightChild
in RightChildren)
184 LeftResult.AddLast(Right.
Encapsulate(RightResult, Node));
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.
static IElement EvaluateNamedOperator(string Name, IElement Left, IElement Right, ScriptNode Node)
Evaluates a named operator available in code-behind.
bool isAsync
If subtree is asynchroneous.
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 ...
Represents a set difference A\B.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
static IElement EvaluateDivision(IElement Left, IElement Right, ScriptNode Node)
Divides the left operand from the right one.
LeftDivide(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Left-Division operator.
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 ring elements.
IRingElement MultiplyRight(IRingElement Element)
Tries to multiply an element to the current element, from the right.
IRingElement Invert()
Inverts the element, if possible.
Basic interface for all types of sets.