pegjs/lib/compiler/passes
David Majda 4fe682794d Improve expression descriptions in error messages
Before this commit, descriptions of literals used in error messages were
built by applying JavaScript string escaping to their values, making the
descriptions look like JavaScript strings. Descriptions of character
classes were built using their raw text. These approaches were mutually
inconsistent and lead to descriptions which were over-escaped and not
necessarily human-friendly (in case of literals) or coupled with details
of the grammar (in case of character classes).

This commit changes description building code in both cases and unifies
it. The intent is to generate human-friendly descriptions of matched
expressions which are clean, unambiguous, and which don't escape too
many characters, while handling special characters such as newlines
well.

Fixes #127.
2016-06-10 10:56:59 +02:00
..
generate-bytecode.js Improve expression descriptions in error messages 2016-06-10 10:56:59 +02:00
generate-js.js Move the "Generated by ..." comment out of wrapping functions 2016-05-03 16:06:21 +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