16 private readonly
bool onlyVariables;
28 this.onlyVariables =
false;
60 return v.ValueElement;
62 if (!this.onlyVariables)
65 if (!(ValueElement is
null))
89 if (!(ValueElement is
null))
94 if (QualifiedNames.Length == 1)
105 int i, c = QualifiedNames.Length;
108 for (i = 0; i < c; i++)
116 v.ValueObject is
Variables GlobalVariables &&
119 return v.ValueElement;
133 if (AlreadyFound.TryGetValue(
this.variableName, out
IElement E) && !E.Equals(CheckAgainst))
164 this.onlyVariables.
Equals(O.onlyVariables) &&
171 int Result = base.GetHashCode();
172 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.
Exception thrown if a variable is not found.
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.
Expression Expression
Expression of which the node is a part.
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.
static IElement TryGetConstant(string VariableName, Variables Variables, ScriptNode Node)
Tries to get a constant value, given a variable name. This method will also check for namespaces and ...
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.