Interface CstNode

A node in the Concrete Syntax Tree (CST).

interface CstNode {
    astNode: AstNode;
    container?: CompositeCstNode;
    element: AstNode;
    end: number;
    feature: GrammarAST.AbstractElement;
    grammarSource: GrammarAST.AbstractElement;
    hidden: boolean;
    length: number;
    offset: number;
    parent?: CompositeCstNode;
    range: Range;
    root: RootCstNode;
    text: string;
}

Hierarchy (view full)

Implemented by

Properties

astNode: AstNode

The AST node created from this CST node

container?: CompositeCstNode

The container node in the CST

element: AstNode

use astNode instead.

end: number

use grammarSource instead.

The grammar element from which this node was parsed

hidden: boolean

Whether the token is hidden, i.e. not explicitly part of the containing grammar rule

length: number
offset: number

use container instead.

range: Range

The root CST node

text: string

The actual text