Protected
Readonly
astProtected
Readonly
descriptionsProtected
Readonly
nameProtected
addAdds a single node to the list of exports if it has a name. Override this method to change how symbols are exported, e.g. by modifying their exported name.
Protected
addAdds a single node to the local symbols of its containing document if it has a name. The default implementation makes the node visible in the subtree of its container if it does have a container. Override this method to change this, e.g. by increasing the visibility to a higher level in the AST.
Creates descriptions of all AST nodes that shall be exported into the global scope from the given
document. These descriptions are gathered by the IndexManager
and stored in the global index so
they can be referenced from other documents.
Note: You should not resolve any cross-references in this service method. Cross-reference resolution
depends on the scope computation phase to be completed (computeScope
method), which runs after the
initial indexing where this method is used.
The document from which to gather exported AST nodes.
Indicates when to cancel the current operation.
Creates AstNodeDescriptions for the given parentNode and its children. The list of children to be considered is determined by the function parameter children. By default only the direct children of parentNode are visited, nested nodes are not exported.
AST node to be exported, i.e., of which an AstNodeDescription shall be added to the returned list.
The document containing the AST node to be exported.
A function called with parentNode as single argument and returning an Iterable supplying the children to be visited, which must be directly or transitively contained in parentNode.
Indicates when to cancel the current operation.
A list of AstNodeDescriptions to be published to index.
Creates descriptions of the local symbols being accessible within a document.
The result is a LocalSymbols
table assigning sets of AST node descriptions to the corresponding
nodes/subtrees within the AST. The descriptions are considered in the default reference resolution
implementation, i.e. they are used by the ScopeProvider
service to determine which symbols
are visible in the context of a specific cross-reference.
Note: You should not resolve any cross-references in this service method. Cross-reference resolution depends on the scope computation phase to be completed.
The document for which to compute its local symbols.
Indicates when to cancel the current operation.
Protected
createProtected
processAdd synthetic type into the scope in case of explicitly inferred type:
case: {infer Action}
Protected
processAdd synthetic type into the scope in case of explicitly or implicitly inferred type:
cases: ParserRule: ...;
or ParserRule infers Type: ...;
The default scope computation creates and collects descriptions of the AST nodes to be exported into the global scope from the given document. By default those are the document's root AST node and its directly contained child nodes.
Besides, it gathers all AST nodes that have a name (according to the
NameProvider
service) and that are to be included in the local scope of their particular container nodes. They are collected in aDocumentSymbols
table. As a result, for every cross-reference in the AST, target elements from the same level (siblings) and further up towards the root (parents and siblings of parents) are visible. Elements being nested inside lower levels (children, children of siblings and parents' siblings) are invisible by default, but that can be changed by customizing this service.