Langium - v4.0.0
    Preparing search index...

    Interface AstNodeLocator

    Language-specific service for locating an AstNode in a document.

    interface AstNodeLocator {
        getAstNode<T extends AstNode = AstNode>(
            node: AstNode,
            path: string,
        ): undefined | T;
        getAstNodePath(node: AstNode): string;
    }

    Implemented by

    Index

    Methods

    • Creates a path represented by a string that identifies an AstNode inside its document. It must be possible to retrieve exactly the same AstNode from the document using this path.

      Parameters

      • node: AstNode

        The AstNode for which to create the path.

      Returns string

      a path represented by a string that identifies node inside its document.