Parser
This is the base of every parser and combinator. You can call these methods on any parser or combinator.
.run()
Section titled “.run()”This method executes your parser and returns it’s ParserState
.
Type declaration
Section titled “Type declaration”run(input: string): ParserState;
.map()
Section titled “.map()”This method allows you to modify the ParserStateResult
using the ParserState
.
Type declaration
Section titled “Type declaration”map(callback: (parserState: ParserState) => ParserStateResult): Parser;