Class ScopeTreeBuilder
Builds a ScopeTree from a flat set of composed symbols. Placement is structural — a symbol's concrete type, its ParentUri, and its access modifier decide its scope:
- module symbols, project-level precompiler constants, global StaticSymbols, and anything the tree cannot otherwise place → the Global scope;
- a standard module's non-
Privatemembers → the project scope, where sibling modules see them; - every module's members — fields, constants, procedures, properties, enums, user-defined
types, events,
Declares → that module's own scope; - a procedure's parameters and its procedure-local
Dim/Static/Const(and the dynamic array a bareReDimintroduces) → that procedure's scope.
Enum members and user-defined-type fields are reached through member access, not lexical scoping,
so they are not placed in the tree. Unqualified enum-member visibility, and ordering referenced
libraries by their .rdproj priority within the global scope, are later work.
public static class ScopeTreeBuilder
- Inheritance
-
ScopeTreeBuilder
- Inherited Members
Methods
Build(IEnumerable<Symbol>)
Builds the scope tree for symbols. Any subset is valid input — a symbol
whose enclosing scope is not in the set is placed in the Global scope.
public static ScopeTree Build(IEnumerable<Symbol> symbols)
Parameters
symbolsIEnumerable<Symbol>