Langium - v4.0.0
    Preparing search index...

    Interface Reference<T>

    A cross-reference in the AST. Cross-references may or may not be successfully resolved.

    interface Reference<T extends AstNode = AstNode> {
        $nodeDescription?: AstNodeDescription;
        $refNode?: CstNode;
        $refText: string;
        error?: LinkingError;
        ref: undefined | T;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    $nodeDescription?: AstNodeDescription

    The node description for the AstNode returned by ref

    $refNode?: CstNode

    The CST node from which the reference was parsed

    $refText: string

    The actual text used to look up in the surrounding scope

    error?: LinkingError

    If any problem occurred while resolving the reference, it is described by this property.

    ref: undefined | T

    The target AST node of this reference. Accessing this property may trigger cross-reference resolution by the Linker in case it has not been done yet. If the reference cannot be resolved, the value is undefined.