Class ScopeTreeSymbolResolver
The compile-time ISymbolResolver: binds an identifier by walking a ScopeTree outward from the scope a lookup originates in — the first scope that declares the name binds it (MS-VBAL §5.2 name binding, RD-VBAL §2.3.1.2). A name declared more than once in a single module or procedure scope resolves as Duplicate(IEnumerable<Symbol>); more than once at the project or global tier resolves as Ambiguous(IEnumerable<Symbol>).
public sealed class ScopeTreeSymbolResolver : ISymbolResolver
- Inheritance
-
ScopeTreeSymbolResolver
- Implements
- Inherited Members
Remarks
A name-resolution service only — the value-binding members throw, matching the intent of a
design-time resolver that holds no run-time bindings. Ordering referenced projects and libraries
by their .rdproj priority within the global scope, and reporting an ambiguous name as a
coded compile-time error rather than an unbound result, are later work.
Constructors
ScopeTreeSymbolResolver(ScopeTree)
The compile-time ISymbolResolver: binds an identifier by walking a ScopeTree outward from the scope a lookup originates in — the first scope that declares the name binds it (MS-VBAL §5.2 name binding, RD-VBAL §2.3.1.2). A name declared more than once in a single module or procedure scope resolves as Duplicate(IEnumerable<Symbol>); more than once at the project or global tier resolves as Ambiguous(IEnumerable<Symbol>).
public ScopeTreeSymbolResolver(ScopeTree scopeTree)
Parameters
scopeTreeScopeTreeThe tree to resolve against.
Remarks
A name-resolution service only — the value-binding members throw, matching the intent of a
design-time resolver that holds no run-time bindings. Ordering referenced projects and libraries
by their .rdproj priority within the global scope, and reporting an ambiguous name as a
coded compile-time error rather than an unbound result, are later work.
Methods
GetValue(Symbol)
Gets the IBindingHandle currently associated with the specified Symbol.
public IBindingHandle GetValue(Symbol symbol)
Parameters
Returns
Resolve(string, ScopeKind, Uri)
Resolves name as seen from the scope the symbol at handle
belongs to. scope is not consulted — the lookup order is the tree's.
public SymbolResolutionResult Resolve(string name, ScopeKind scope, Uri handle)
Parameters
Returns
TryRead(MemoryAddress, out IBindingHandle?)
Gets the IBindingHandle at the specified address in the runtime memory map.
public bool TryRead(MemoryAddress address, out IBindingHandle? value)
Parameters
addressMemoryAddressThe memory address to read.
valueIBindingHandleThe retrieved binding, if successful.