-
-
Notifications
You must be signed in to change notification settings - Fork 322
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.
Thank you for your contribution! Sometimes PRs end up staying open for a long time without activity, which can make the list of open PRs get long and time-consuming to review. To keep things manageable for reviewers, this bot automatically closes PRs that haven’t had activity in 60 days. This PR hasn’t had activity in 30 days, so it will be automatically closed if there is no more activity in the next 30 days. Keep in mind that PRs marked |
Fixed the issue of not allowing white space before commas that separated function arguments