-
Notifications
You must be signed in to change notification settings - Fork 601
recursive select calls are parsed with bad trailing_commas parameter #1521
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
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.
Thanks @tomershaniii! Left some comments, I think the changes look reasonable overall
a93ba22
to
f5ec87b
Compare
Thanks for the review @iffyio, changes committed per your suggestions |
1d1547e
to
2f70699
Compare
With tests fixed. @iffyio |
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.
LGTM! cc @alamb
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.
Thank you @tomershaniii and @iffyio
|
||
let ret = self.parse_comma_separated(|p| p.parse_select_item()); | ||
self.options.trailing_commas = old_value; | ||
let trailing_commas = |
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.
this is a nice improvement
The parse_projection function modifies the parsers 'options' flag, this creates different behavior when nesting select calls i.e. select(select()) which can manifest in failure to parse (see unit test)