• Public
  • Public/Protected
  • All

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.


  • CstNode



Readonly children

Optional Readonly location

location?: CstNodeLocation

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

Readonly name

name: string

Optional Readonly recoveredNode

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