* Ignore trailing commas in `ExpectedDebug`
rust-lang/rust/pull/59076 changed the multiline Debug representation to
always include a trailing comma. This change currently breaks our tests
on beta and nightly, since we use this Debug representation to compare
expected parsing output.
We cannot simply add the trailing commas to the expected output strings,
since that would break on older rustc versions we support. Instead, this
commit makes it so that all trailing commas are stripped before the
comparison.
This workaround can be removed once rust-lang/rust/pull/59076 reaches
our minimum supported rustc version.
* Bump minimum Rust version to 1.31.0
That's required by the current version rustc-demangle, which is a
dependency of mdbook.
* Split apart UnrecognizedEOF error variant from UnrecognizedToken
* Factor out fmt_expected function
* Initial attempt at fixing codegen
- Match on lookahead when returning error
- Use last fixed symbol as location of UnrecognizedEOF
- Use `Default::default()` when there are no fixed symbols (?)
* Initial implementation of finding latest optional location
* Fix UnrecognizedToken errors in `Some` test cases
* Fix UnrecognizedEOF test cases
* Fix parentheses around pattern error for 1.26 compatibility
* Add basic test for UnrecognizedEOF (and hopefully trigger Travis build)
* Fix emitted indentation and use travis_wait when testing
Instead we use --all-features to enable a special `test` feature to run tests with a freshly generated lrgrammar.rs. Since we also have a test to check that the saved lrgrammar.rs is identical to what lalrpop generates we should be ok with this approach.
Closes#436