Interface Scope

A scope describes what target elements are visible from a specific cross-reference context.

interface Scope {
    getAllElements(): Stream<AstNodeDescription>;
    getElement(name: string): undefined | AstNodeDescription;
}

Implemented by

Methods

  • Find a target element matching the given name. If no element is found, undefined is returned. If multiple matching elements are present, the selection of the returned element should be done according to the semantics of your language. Usually it is the element that is most closely defined.

    Parameters

    • name: string

      Name of the cross-reference target as it appears in the source text.

    Returns undefined | AstNodeDescription