Skip to content

Improve soft modifiers docs #10748

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 1 commit into from
Dec 16, 2020

Conversation

camilaagw
Copy link
Contributor

No description provided.

@@ -9,7 +9,6 @@ TODO this is most likely outdated should at least contain `extension` in additio
Worth maintaining? or maybe better refer to internal/syntax.md ?
-->

It is treated as a potential modifier of a definition, if it is followed by a hard modifier or a keyword combination starting a definition (`def`, `val`, `var`, `type`, `class`, `case class`, `trait`, `object`, `case object`, `enum`). Between the two words there may be a sequence of newline tokens and soft modifiers.
It is treated as a potential modifier of a definition if it is followed by a hard modifier or a keyword combination starting a definition (`def`, `val`, `var`, `type`, `class`, `trait`, `object`, `enum`, `given`). Between the two words there may be a sequence of newline tokens and soft modifiers. In addition, `inline` is a keyword for `inline if`, `inline ... match`, and inline parameters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are case object and case class removed by accident?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed them on purpose. case class definitions are class definitions. Having both seemed to be redundant. The same applies to object and case object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file Tokens.scala contains the definitions defIntroTokens and templateIntroTokens. It might be a little better to align with the definitions there.

@camilaagw camilaagw force-pushed the improve-docs-soft-modifiers branch from 72d1bca to 445db39 Compare December 15, 2020 14:39
@camilaagw camilaagw force-pushed the improve-docs-soft-modifiers branch from 445db39 to 9c84189 Compare December 16, 2020 12:59
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @camilaagw 🎉

@liufengyun liufengyun merged commit ec94bc4 into scala:master Dec 16, 2020
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.

2 participants