pegjs: Different errors returned when cache is enabled/disabled
Grammar:
Statement
= "{" __ !Statement Statement __ "}"
__
= [ \t\r\n]*
Input:
{x}
With results cache disabled, the above produces this error:
Expected “{” or [ \t\r\n] but “x” found.
With results cache enabled, the error changes to:
Expected [ \t\r\n] but “x” found.
The errors should be the same in both cases.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20 (5 by maintainers)
Commits related to this issue
- add failing test case for #452 — committed to nikku/pegjs by nikku 6 years ago
- fix for #452 @ peg-js v0.10.0 — committed to nikku/pegjs by nikku 6 years ago
- Report consistent errors on look ahead + cached results This should resolve issue #452, and is based entirely on a fix @nikku did on a local branch of PEG.js v0.10.0 (Currently at https://github.com/... — committed to pegjs/pegjs by futagoza 6 years ago
- Updated changelog for upcoming 0.11 — committed to pegjs/pegjs by futagoza 6 years ago
You can have a look at a fix here.