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 scope of new/delete Fix #64 #65

Closed
wants to merge 2 commits into from
Closed

change scope of new/delete Fix #64 #65

wants to merge 2 commits into from

Conversation

matter123
Copy link
Collaborator

@matter123 matter123 commented Apr 9, 2019

This PR changes the scope of new/delete to keyword.other.memory.new and keyword.other.memory.delete. To resolve the issue originally described in #64

  • keyword.operator.memory.new is not correct because new in new expressions is not an operator, only in operator new(size_t) is new an operator. Additionally many themes do not color operators.
  • keyword.control is incorrect as new does not participate in control flow.

This PR (with default dark +)
Screenshot from 2019-04-09 08-50-11

@jeff-hykin
Copy link
Owner

Thanks for looking this up, I didn't realize that was the case with the C++ spec. I've posted talking to alexr00 from the VS Code team, as soon she gives the okay I'll merge this in.

@matter123
Copy link
Collaborator Author

matter123 commented Apr 9, 2019

Per #64 (comment) the scopes were changed to keyword.operator.new and keyword.operator.delete
Image:
Screenshot from 2019-04-09 10-58-38

@jeff-hykin
Copy link
Owner

I went ahead and manually merged this in.

I also added a memory tag to all of the memory types
and a keyword.operator.wordlike to all of the wordlike operators

This should work the best since it maintains backwards compatibility while still making it easy for every possible combination. For example:

memory keyword.operator will tag all of the memory keywords
keyword.operator.wordlike keyword.operator will tag all of the wordlike operators
keyword.operator.new will take priority over both of those.
memory keyword.operator.new will take priority over all three of the above.

@jeff-hykin jeff-hykin closed this Apr 10, 2019
@matter123 matter123 deleted the Fix-#64 branch April 11, 2019 19:16
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