Skip to main content

Parser

This is the base of every parser and combinator. You can call these methods on any parser or combinator.

.run()

This method executes your parser and returns it's ParserState.

Type declaration

run(input: string): ParserState;

.map()

This method allows you to modify the ParserStateResult using the ParserState.

Type declaration

map(callback: (parserState: ParserState) => ParserStateResult): Parser;