-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Fixed issue #2457 #7361
base: main
Are you sure you want to change the base?
Fixed issue #2457 #7361
Conversation
Commas before function arguement types on lines will no longer give errors.
…to whitespace_func
@@ -605,7 +605,10 @@ fn expression<'a>( | |||
.parse(arena, state, min_indent)?; | |||
|
|||
let (p2, rest, rest_state) = zero_or_more(skip_first( | |||
backtrackable(byte(b',', EType::TFunctionArgument)), | |||
backtrackable(skip_first( |
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.
Rather than doing skip_first
, I think we need to be preserving this space in the tree. Otherwise we could accidentally lose a comment when formatting, for example.
Rather than separately tracking spaces before/after the comma, we should probably just merge them. There's a handy merge_spaces
function for just that purpose.
Fixed the issue of not allowing white space before commas that separated function arguments