Skip to main content


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


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

Type declaration

run(input: string): ParserState;


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

Type declaration

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