1using System.Threading.Tasks;
64 if (!this.IsAsynchronous)
105 if (!(this.argument is
null))
107 bool b = !Callback(this.argument, out
ScriptNode NewNode, State);
108 if (!(NewNode is
null))
110 this.argument = NewNode;
113 this.isAsync = NewNode.IsAsynchronous;
116 if (b || (Order ==
SearchMethod.TreeOrder && !
this.argument.ForAllChildNodes(Callback, State, Order)))
133 this.argument.
Equals(O.argument) &&
140 int Result = base.GetHashCode();
141 Result ^= Result << 5 ^ this.argument.
GetHashCode();
Class managing a script expression.
Base class for all funcions.
Base class for funcions of one variable.
override int GetHashCode()
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
override bool Equals(object obj)
ScriptNode Argument
Function argument.
override string[] DefaultArgumentNames
Default Argument names
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
FunctionOneVariable(ScriptNode Argument, int Start, int Length, Expression Expression)
Base class for funcions of one variable.
abstract IElement Evaluate(IElement Argument, Variables Variables)
Evaluates the function.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
virtual Task< IElement > EvaluateAsync(IElement Argument, Variables Variables)
Evaluates the function.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
override bool Equals(object obj)
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.
override int GetHashCode()
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.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure