Skip to content

ISymbolResolver Interface ​

Definition ​

Resolves symbols (variables, functions, and types) used by the expression parser and AstEvaluator when binding and evaluating AST nodes.

  • Namespace: JASE.Expressions
  • Assembly: JASE.Expressions.dll

Methods ​

NameDescription
SymbolKind ResolveSymbolKind(string identifier, string parent = null)Determines how an identifier should be interpreted in the current context, e.g. as a variable, function, field, property, or type.
void SetFunction(string name, Func<object[], object> function)Registers or replaces a global function that can be called from an expression using its name (for example, MyFunc(1, 2)).
void SetVariable(string name, object value)Sets or replaces a variable in the current evaluation scope. The variable's runtime type is inferred from the value argument.
void SetVariable(string name, object value, Type type)Sets or replaces a variable in the current evaluation scope with an explicit type description used for reflection and type metadata.
bool TryGetFunction(string name, out Func<object[], object> function)Attempts to resolve a previously registered global function by name.
bool TryGetTypeClass(string name, out TypeClass value)Attempts to resolve or obtain type metadata for a known CLR type. Implementations may support both simple type names (for example, "Guid") and fully qualified names (for example, "System.Guid").
bool TryGetVariable(string name, out object value)Attempts to resolve a previously registered variable by name.