Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8461c77

Browse files
Adapt to new tree-sitter last match wins
1 parent 9a7e362 commit 8461c77

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

‎queries/rescript/highlights.scm

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@
104104

105105
; function calls
106106

107-
; neovim and tree-sitter-cli handle conflicts differently:
108-
; in tree-sitter-cli the first match wins, while in neovim the last match does.
109-
; to get the desired result for `raise` in both, we put it before the general function call
110-
; queries (for the CLI), but also add a priority metadata rule (for neovim).
111-
112-
(call_expression
113-
function: (value_identifier) @keyword.exception
114-
(#set! "priority" 105)
115-
(#eq? @keyword.exception "raise"))
116-
117107
(call_expression
118108
function: (value_identifier_path
119109
_
@@ -195,6 +185,9 @@
195185
"catch"
196186
] @keyword.exception
197187

188+
(call_expression
189+
function: (value_identifier) @keyword.exception
190+
(#eq? @keyword.exception "raise"))
198191

199192
[
200193
"for"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /