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.

Original report

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (5 by maintainers)

Commits related to this issue

Most upvoted comments

You can have a look at a fix here.