Interface AstNodeDescriptionProvider

Language-specific service for creating descriptions of AST nodes to be used for cross-reference resolutions.

interface AstNodeDescriptionProvider {
    createDescription(node: AstNode, name: undefined | string, document?: LangiumDocument<AstNode>): AstNodeDescription;
}

Implemented by

Methods

  • Create a description for the given AST node. This service method is typically used while indexing the contents of a document and during scope computation.

    Parameters

    • node: AstNode

      An AST node.

    • name: undefined | string

      The name to be used to refer to the AST node. By default, this is determined by the NameProvider service, but alternative names may be provided according to the semantics of your language.

    • Optionaldocument: LangiumDocument<AstNode>

      The document containing the AST node. If omitted, it is taken from the root AST node.

    Returns AstNodeDescription