pegjs/lib/compiler/passes
David Majda 8639cf6d61 Expectation refactoring 6/7: Move "buildMessage" to SyntaxError
The "buildMessage" utility function, which was previously internal, is
now exposed as SyntaxError.buildMessage in generated parsers.

The motivation behind this is two-fold:

  1. Building of a syntax error message is a responsibility of the
     SyntaxError class, meaning the code should be placed there.

  2. By exposing the message building code, parser users can use it to
     generate customized error messages without duplicating PEG.js's code.

Note that helper functions inside "buildMessage" ("describeExpected",
"describeFound", etc.) currently aren't exposed. They may become exposed
in the future if there is enough demand.
2016-06-17 19:25:28 +02:00
..
generate-bytecode.js Expectation refactoring 4/7: Generate descriptions dynamically 2016-06-17 19:22:51 +02:00
generate-js.js Expectation refactoring 6/7: Move "buildMessage" to SyntaxError 2016-06-17 19:25:28 +02:00
remove-proxy-rules.js Convert PEG.js code to strict mode 2015-06-12 17:34:59 -07:00
report-infinite-loops.js Report left recursion and infinite loops only as "possible" 2015-09-11 14:58:53 +02:00
report-left-recursion.js Report full rule chain in recursive rule errors 2015-09-11 15:09:42 +02:00
report-missing-rules.js Convert PEG.js code to strict mode 2015-06-12 17:34:59 -07:00