Utility function that provides a bit cleaner interface for running a parser.
This one throws an error in case parser didn't match OR the match is incomplete (some part of tokens array left unparsed).
A parser to run.
Input tokens.
Parser options.
A function to stringify a token (Defaults to JSON.stringify. For incomplete match error message).
JSON.stringify
A matched value.
Utility function that provides a bit cleaner interface for running a parser.
This one throws an error in case parser didn't match OR the match is incomplete (some part of tokens array left unparsed).