Skip to content

Refactor handling of statement separators in Parser #12305

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

Merged
merged 8 commits into from
May 5, 2021

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 1, 2021

  • Remove some duplication in parser routines.
  • Avoid some follow-on errors
  • Treat end markers as soft keywords recognized by Scanner

Fixes #12150 by emitting a better error message

odersky added 7 commits May 1, 2021 11:50
Detect end markers in Scanner
and fix repltests
 - Only recognize it under indentSyntax
 - But include it as a possible statement start even under Scala 2.
   END might be detected before it can be converted back to IDENTIFIER.
   So it needs to be included in canStartStatement2, just like IDENTIFIER.
@odersky odersky merged commit eff4cb1 into scala:master May 5, 2021
@odersky odersky deleted the fix-12150 branch May 5, 2021 07:33
@Kordyjan Kordyjan added this to the 3.0.1 milestone Aug 2, 2023
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.

End on empty method returning Unit
3 participants