-
Notifications
You must be signed in to change notification settings - Fork 472
Improve diagnostics for invalid version tuples #1717
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
Improve diagnostics for invalid version tuples #1717
Conversation
4a1a969 to
ee1bd18
Compare
ee1bd18 to
9ceda38
Compare
| return .visitChildren | ||
| } | ||
| if let unexpectedBetweenArgumentAndRightParen = node.unexpectedBetweenArgumentAndRightParen, | ||
| var missingArgumentNode = node.argument?.missingNodes.only |
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.
missingNodes seems a little magical to me and I get the feeling that it’s not the right design because you need to patch it up further below. I think a better design would be to
- Modify the parser and eat e.g.
0xffas an unexpected token when parsing theVersionTupleSyntax. - Generate the diagnostic in
visit(_ node: VersionTupleSyntax)
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.
Aha I'll try again. Thanks for the feedback! 🙇
|
It looks like you have accidentally pulled in a few unrelated commits here |
|
I apologize profusely 😓 It appears that there might be an issue with my branch. |
2209cc8 to
dd976be
Compare
|
No worries! |
Resolve #1613