Creates an instance of Parser
.
The tokenizer containing the list of tokens to parse.
Optional parser configuration (defaults to DefaultParserOptions
).
Parser configuration options.
List of parsed tokens of various types.
Static
Readonly
LoopMapping of special loop symbols to their respective loop counts.
Static
ParseParses a string of code into a Parser
instance with parsed tokens.
The input code to parse.
Optional
options: Partial<ParserOptions>Optional parser configuration.
A new instance of the Parser
with parsed tokens.
Static
Parse
The
Parser
class parses a series of tokens generated by theTokenizer
. It supports parsing loops, blocks, files, and reserved tokens, while handling errors and file validation.