forked from bytecodealliance/vscode-wit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: separate rules for
result
keyword with and without <>
fix bytecodealliance#35 This commit separates the syntax highlighting rules for `result` types with angle brackets (`result<...>`) and `result` types without type parameters. Previously, both types were handled in a single rule, `meta.result.ty.wit`, which ended at a newline (technically "after"), comma, or closing bracket. However, if a `result` type appeared as a parameter, the scope wouldn't end until one of these conditions was met. (As observed, the scope didn’t end even when a newline was encountered, likely because it was captured by other rules, though...). This change simplifies the `meta.result.ty.wit` scope by splitting the handling of `result<...>` and `result`. Now, `result<...>` is handled similarly to `list<...>` and `tuple<...>`, while `result` without `<...>` is handled by `result-base`, which marks the `result` keyword as `entity.name.type.result.wit`. As a consequence of this change, line comments on `result<xxx> // comment` will no longer be ignored. However, this is a known issue for other types as well.
- Loading branch information
1 parent
e4c1ca6
commit 256f285
Showing
15 changed files
with
577 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.