Skip to content

Fix #5145: Improve treatment of soft modifiers #5471

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 6 commits into from
Nov 20, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 19, 2018

  • Generalize treatment of inline to a set of soft modifiers
  • Make opaque a soft modifier
  • Fix parsing of soft modifiers so that they are treated as modifiers
    only when preceding a hard modifier or a definition keyword

@odersky
Copy link
Contributor Author

odersky commented Nov 19, 2018

The syntaxHighlighting test fails because it stopped highlighting inline as a keyword in

class inline

The test should be fixed, but I don't know how to do it. @Duhemm can you help?

@Duhemm
Copy link
Contributor

Duhemm commented Nov 19, 2018

I think that @allanrenucci is the Syntax Highlighting Guru

@Duhemm Duhemm assigned allanrenucci and unassigned Duhemm Nov 19, 2018
@allanrenucci allanrenucci removed their assignment Nov 19, 2018
Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

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

def test(inline: Int) = 1

This doesn't work

odersky and others added 6 commits November 20, 2018 11:02
 - Generalize treatment of `inline` to a set of soft modifiers
 - Make `opaque` a soft modifier
 - Fix parsing of soft modifiers so that they are treated as modifiers
   only when preceding a hard modifier or a definition keyword
 - also handle parameter modifiers
 - add a spec
Soft modifiers in modifier position are not considered as binder names.
@allanrenucci
Copy link
Contributor

I have added def foo(inline: Int) = 2 to the syntax highlighting tests

@allanrenucci allanrenucci merged commit 07aaaf9 into scala:master Nov 20, 2018
@allanrenucci allanrenucci deleted the fix-#5145 branch November 20, 2018 10:34
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.

3 participants