2using System.Collections.Generic;
3using System.Threading.Tasks;
70 if (dl < long.MinValue || dl >
long.MaxValue || dl != Math.Truncate(dl))
73 if (dr < long.MinValue || dr >
long.MaxValue || dr != Math.Truncate(dr))
89 if (!LeftSet.Equals(RightSet))
102 if (!(Result2 is
null))
109 LinkedList<IElement> Elements =
new LinkedList<IElement>();
121 LinkedList<IElement> Elements =
new LinkedList<IElement>();
133 if (LeftChildren.Count == RightChildren.Count)
135 LinkedList<IElement> Elements =
new LinkedList<IElement>();
136 IEnumerator<IElement> eLeft = LeftChildren.GetEnumerator();
137 IEnumerator<IElement> eRight = RightChildren.GetEnumerator();
141 while (eLeft.MoveNext() && eRight.MoveNext())
142 Elements.AddLast(
EvaluateResidue(eLeft.Current, eRight.Current, Node));
154 LinkedList<IElement> LeftResult =
new LinkedList<IElement>();
156 foreach (
IElement LeftChild
in LeftChildren)
158 LinkedList<IElement> RightResult =
new LinkedList<IElement>();
160 foreach (
IElement RightChild
in RightChildren)
163 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 ...
static IElement EvaluateResidue(IElement Left, IElement Right, ScriptNode Node)
Divides the right operand from the left one.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
Residue(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Residue operator.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
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 Euclidian domain elements.
Basic interface for all types of euclidian domains.
Basic interface for all types of sets.