Table of Contents

Class ScopeTree

Namespace
RDCore.SDK.Model.Symbols
Assembly
RDCore.SDK.dll

The lexical-scope tree of a composed set of symbols: a Global scope at the root, a scope per module, and a scope per procedure body. Built by ScopeTreeBuilder; the static and run-time name resolvers walk it to bind an identifier (RD-VBAL §2.3.1.2).

public sealed class ScopeTree
Inheritance
ScopeTree
Inherited Members

Properties

Global

The root scope — every lookup that is not bound sooner ends here.

public LexicalScope Global { get; }

Property Value

LexicalScope

Methods

ScopeFor(Uri)

The scope a name lookup should start from when it originates at uri: the scope uri defines if it is a module or a procedure, otherwise the scope that declares the symbol at uri. Falls back to Global for a uri the tree does not know.

public LexicalScope ScopeFor(Uri uri)

Parameters

uri Uri

Returns

LexicalScope

TryGetScope(Uri, out LexicalScope?)

Looks up the scope uri defines, or the scope it is declared in.

public bool TryGetScope(Uri uri, out LexicalScope? scope)

Parameters

uri Uri
scope LexicalScope

Returns

bool

false when the tree does not know uri.