Closed kschiess closed 12 years ago
Addressing this bug in the error_msg_rehaul branch. Tests don't pass yet, but the error messages look better.
This issue is largely solved on master.
The removal of @last_error makes issue #64 all the more important. See the mailing list for a status report on that.
Saving the '@offending_parslet' in alternatives (but not only there) in the parslet instance itself is not correct. In cases where one parslet can be nested in itself, the @offending_parslet will contain only the innermost error after the parse.
This can be seen in Johns gist in issue #64: (https://gist.github.com/2374233) In the sample
the error message will contain why the define-rule didn't match '@bar.baz' and not why it didn't match 'begin ... end'.
Storing this kind of stuff in instance variables is a design-smell anyway. This is the issue why we need to take that out.