2using System.Collections.Generic;
16 private readonly
bool onlyVariables;
28 this.onlyVariables =
false;
60 return v.ValueElement;
62 if (!this.onlyVariables)
71 if (!(ValueElement is
null))
76 if (QualifiedNames.Length == 1)
87 int i, c = QualifiedNames.Length;
90 for (i = 0; i < c; i++)
98 v.ValueObject is
Variables GlobalVariables &&
101 return v.ValueElement;
116 if (AlreadyFound.TryGetValue(
this.variableName, out
IElement E) && !E.Equals(CheckAgainst))
147 this.onlyVariables.
Equals(O.onlyVariables) &&
154 int Result = base.GetHashCode();
155 Result ^= Result << 5 ^ this.onlyVariables.GetHashCode();
Static class that dynamically manages types and interfaces available in the runtime environment.
static Type GetType(string FullName)
Gets a type, given its full name.
static bool TryGetQualifiedNames(string UnqualifiedName, out string[] QualifiedNames)
Gets an array (possibly null) of qualified names relating to an unqualified name.
static bool IsRootNamespace(string Name)
Checks if a name is a root namespace.
Script runtime exception.
Class managing a script expression.
static bool TryGetConstant(string Name, Variables Variables, out IElement ValueElement)
Tries to get a constant value, given its name.
Represents a constant element value.
Represents a variable reference.
readonly string variableName
Name of variable being referenced by the node.
string VariableName
Variable Name.
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.
Represents a variable reference.
bool OnlyVariables
If only values of variables should be returned (true), or if constants and namespaces should also be ...
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
ScriptNode Differentiate(string VariableName, Variables Variables)
Differentiates a script node, if possible.
VariableReference(string VariableName, bool OnlyVariables, int Start, int Length, Expression Expression)
Represents a variable reference.
override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
VariableReference(string VariableName, int Start, int Length, Expression Expression)
Represents a variable reference.
string DefaultVariableName
Default variable name, if any, null otherwise.
override bool Equals(object obj)
override int GetHashCode()
static readonly DoubleNumber ZeroElement
0
static readonly DoubleNumber OneElement
1
Contains information about a variable.
virtual bool TryGetVariable(string Name, out Variable Variable)
Tries to get a variable object, given its name.
Basic interface for all types of elements.
Base interface for lambda expressions.
PatternMatchResult
Status result of a pattern matching operation.