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

Highlight Self and defer appropriately #368

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Conversation

alex-pinkus
Copy link
Owner

Adds special case #eq? clauses into the highlight queries for special cases where we have keywords or builtins that aren't in the grammar.

Specifically:

  • With Self, this is parsed as a boring type identifier, but should be
    highlighted as a builtin variable.
  • With defer { }, this is parsed as a function, but the behavior is
    unique enough that it is reasonable to present it as a keyword.

With this and other recent fixes, all of the issues identified in #351 have been fixed.

Adds special case `#eq?` clauses into the highlight queries for special
cases where we have keywords or builtins that aren't in the grammar.

Specifically:
* With `Self`, this is parsed as a boring type identifier, but should be
  highlighted as a builtin variable.
* With `defer { }`, this is parsed as a function, but the behavior is
  unique enough that it is reasonable to present it as a keyword.
@alex-pinkus alex-pinkus merged commit 5ba552f into main Mar 4, 2024
55 checks passed
@alex-pinkus alex-pinkus deleted the highlight-self-defer branch March 4, 2024 00:35
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.

1 participant