Interface CstNode

A Concrete Syntax Tree Node. This structure represents the whole parse tree of the grammar This means that information on each and every Token is present. This is unlike an AST (Abstract Syntax Tree) where some of the syntactic information is missing.

For example given an ECMAScript grammar, an AST would normally not contain information on the location of Commas, Semi colons, redundant parenthesis ect, however a CST would have that information.

Hierarchy

  • CstNode

Properties

location?: CstNodeLocation

Will only be present if the nodeLocationTracking is not set to "none". See: https://chevrotain.io/docs/guide/concrete_syntax_tree.html#cstnodes-location For more details.

name: string
recoveredNode?: boolean

A flag indicating the whole CSTNode has been recovered during re-sync error recovery. This means that some of the node's children may be missing.

Generated using TypeDoc