Langium - v4.4.0
    Preparing search index...

    Class LeafCstNodeImpl

    A leaf CST node corresponds to a token in the input token stream.

    Hierarchy (View Summary)

    Implements

    Index
    • All position values are 0-based and the end position is exclusive, following the LSP convention (see the Range type).

      Parameters

      • offset: number
      • length: number
      • startLine: number
      • startColumn: number
      • endLine: number
      • endColumn: number
      • tokenType: TokenType
      • hidden: boolean = false

      Returns LeafCstNodeImpl

    container: CompositeCstNode | undefined = undefined

    The container node in the CST

    grammarSource: GrammarAST.AbstractElement | undefined = undefined

    The grammar element from which this node was parsed

    • get text(): string

      The actual text covered by this node.

      The text is extracted from the document content on every access. When processing many nodes of the same tree, prefer resolving root.fullText once and slicing it with the nodes' offset and end values.

      Returns string