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

Fix #5145: Improve treatment of soft modifiers #5471

Merged
merged 6 commits into from Nov 20, 2018

Conversation

Projects
None yet
3 participants
@odersky
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

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

@allanrenucci
Copy link
Member

allanrenucci left a comment

def test(inline: Int) = 1

This doesn't work

Show resolved Hide resolved compiler/src/dotty/tools/dotc/core/StdNames.scala Outdated

@odersky odersky force-pushed the dotty-staging:fix-#5145 branch from a630c82 to 011aab6 Nov 20, 2018

odersky and others added some commits Nov 19, 2018

Fix #5145: Improve treatment of soft modifiers
 - 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
Refinements to soft modifiers
 - also handle parameter modifiers
 - add a spec
Fix `isBindingIntro`
Soft modifiers in modifier position are not considered as binder names.

@allanrenucci allanrenucci force-pushed the dotty-staging:fix-#5145 branch from 3200c99 to 36e8fe1 Nov 20, 2018

@allanrenucci

This comment has been minimized.

Copy link
Member

allanrenucci commented Nov 20, 2018

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

@allanrenucci allanrenucci merged commit 07aaaf9 into lampepfl:master Nov 20, 2018

1 check passed

continuous-integration/drone/pr the build was successful
Details

@allanrenucci allanrenucci deleted the dotty-staging:fix-#5145 branch Nov 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment