-
Notifications
You must be signed in to change notification settings - Fork 38
Add source snippets to missing_from_lexer/parser errors. #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| cl.missing_from_lexer().map(|x| x.to_owned()), | ||
| cl.missing_from_parser().map(|x| x.to_owned()), | ||
| cl.missing_from_parser() | ||
| .map(|x| x.iter().map(|(n, _)| n.to_owned()).collect::<HashSet<_>>()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps worth noting that this ugly bit is in deprecated code.
|
This one I like! I think we can merge this as-is? |
|
Sure, the only thing I that has come to mind after sleeping on it is whether we should print a warning when The thing to note is that
|
Agreed.
Can we follow the precedent in |
We can, however We might want to change That would be more in line with the current |
Here is take two of PR #570 this one shouldn't affect semver in any way because it ignores the duplication of data between between the
rule_ids, andyacc_grammarfield.This just avoids the code duplication from my original patch without touching on that issue by tweaking things to be less like nimbleparse, and more like the code already in
CTLexerBuilder.We can perhaps reduce field duplication as a follow up, if it is something you would like to see just say so.
Perhaps using the later commits in #570 as a starting point (or not!)