Class: Parser
Constructors
Constructor
new Parser(
grammar):Parser
Parameters
grammar
Returns
Parser
Properties
grammar
grammar:
Grammar
Methods
parse()
parse(
input,rootRule?):CST|null
Parameters
input
string
rootRule?
string
Returns
CST | null
parseAt()
parseAt(
input,pos,ruleName): {end:number;node:CST; } |null
Parses the input starting from a specific position using a given rule. Useful for incremental parsing.
Parameters
input
string
pos
number
ruleName
string
Returns
{ end: number; node: CST; } | null