Langium - v4.0.0
    Preparing search index...

    Class DefaultLinker

    Language-specific service for resolving cross-references in the AST.

    Implements

    Index

    Constructors

    Properties

    astNodeLocator: AstNodeLocator
    langiumDocuments: () => LangiumDocuments
    reflection: AstReflection
    scopeProvider: ScopeProvider

    Methods

    • Creates a cross reference node being aware of its containing AstNode, the corresponding CstNode, the cross reference text denoting the target AstNode being already extracted of the document text, as well as the unique cross reference identifier.

      Default behavior:

      • The returned Reference's 'ref' property pointing to the target AstNode is populated lazily on its first visit.
      • If the target AstNode cannot be resolved on the first visit, an error indicator will be installed and further resolution attempts will not be performed.

      Parameters

      • node: AstNode

        The containing AST node

      • property: string

        The AST node property being referenced

      • refNode: undefined | CstNode

        The corresponding CST node

      • refText: string

        The cross reference text denoting the target AstNode

      Returns Reference

      the desired Reference node, whose behavior wrt. resolving the cross reference is implementation specific.