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

Change pattern keyword scopes #277

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Change pattern keyword scopes #277

merged 1 commit into from
Aug 22, 2023

Conversation

wise0704
Copy link
Contributor

Following discussion #276 (comment).

@wise0704
Copy link
Contributor Author

wise0704 commented Aug 22, 2023

Original comment

Other expression word operators should also take either keyword.operator.wordlike (C++) or keyword.operator.expression (TypeScript). All of these are currently keyword.other.*:

  • await
  • default
  • nameof
  • typeof
  • as (keyword.operator.cast.as.cs might be the best fit)
  • with
  • new (keyword.operator.new.cs might be good enough, still better than keyword.other.)
  • stackalloc
  • using
  • using static

Some other notes:

keyword.other.*storage.type.*

  • class
  • interface
  • delegate
  • enum
  • struct
  • record
  • namespace
  • event
  • operator
  • var
  • get
  • set
  • init
  • add
  • remove

keyword.other.*storage.modifier.*

  • implicit
  • explicit

keyword.other.*keyword.control.*

  • checked
  • unchecked
  • lock
  • using
  • where
  • (not yet added) fixed
  • (not yet added) unsafe

Edit: Created a new issue instead.

Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

Thanks @wise0704! I agree keyword.other is overused.

@JoeRobich JoeRobich merged commit e296059 into dotnet:main Aug 22, 2023
2 checks passed
@wise0704 wise0704 deleted the scope branch August 22, 2023 19:30
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