2using System.Collections.Generic;
3using System.Threading.Tasks;
87 if ((Obj is
null) || (Obj is
string s &&
string.IsNullOrEmpty(s)))
95 if (AlreadyFound.TryGetValue(Ref.VariableName, out
IElement Value) &&
96 !(Value.AssociatedObjectValue is
null))
101 AlreadyFound[Ref.VariableName] =
null;
Class managing a script expression.
Makes sure an expression is defined. Otherwise, an exception is thrown.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override IElement Evaluate(IElement Argument, Variables Variables)
Evaluates the function.
Optional(ScriptNode Argument, int Start, int Length, Expression Expression)
Makes sure an expression is defined. Otherwise, an exception is thrown.
override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
override string FunctionName
Name of the function
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
Base class for funcions of one variable.
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
virtual PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
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 variable reference.
static readonly ObjectValue Null
Null value.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
PatternMatchResult
Status result of a pattern matching operation.
SearchMethod
Method to traverse the expression structure