Skip to content
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

Add a few more items to the _semi-suppressor #32

Merged
merged 1 commit into from
Oct 16, 2021
Merged

Add a few more items to the _semi-suppressor #32

merged 1 commit into from
Oct 16, 2021

Conversation

alex-pinkus
Copy link
Owner

Fixes #15 adding else to the list of keywords that the custom scanner
will use to skip _semi tokens.

Also, just like throws and rethrows, a where clause may dangle off
of the end of a function declaration. The declaration will look
syntactically valid without it, but then when the parser encounters the
where, everything will blow up.

This handles where the same as the other keywords that have this
problem by moving it to the custom scanner.

@alex-pinkus alex-pinkus marked this pull request as draft October 16, 2021 22:51
Fixes #15 adding `else` to the list of keywords that the custom scanner
will use to skip `_semi` tokens.

Also, just like `throws` and `rethrows`, a where clause may dangle off
of the end of a function declaration. The declaration will look
syntactically valid without it, but then when the parser encounters the
`where`, everything will blow up.

This handles `where` the same as the other keywords that have this
problem by moving it to the custom scanner.
@alex-pinkus alex-pinkus marked this pull request as ready for review October 16, 2021 23:07
@alex-pinkus alex-pinkus merged commit 13f5c75 into main Oct 16, 2021
@alex-pinkus alex-pinkus deleted the else-if branch October 16, 2021 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The else of an else if can't be put on its own line
1 participant