Skip to content

Commit 4c6da7b

Browse files
committed
Use block_statement_else and block_statement_else_if in queries
1 parent 41abed5 commit 4c6da7b

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

queries/glimmer/highlights.scm

+5-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
(block_statement_end
3232
path: (identifier) @keyword.conditional)
3333

34-
((mustache_statement
35-
(identifier) @keyword.conditional)
36-
(#lua-match? @keyword.conditional "else"))
34+
[
35+
"else"
36+
"else if"
37+
] @keyword.conditional
38+
3739

3840
; == Mustache Statements ===
3941
; Highlight the whole statement, to color brackets and separators

queries/glimmer/indents.scm

+1-8
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
"}}"
2323
] @indent.branch
2424

25-
(mustache_statement
26-
(helper_invocation
27-
helper: (identifier) @_identifier
28-
(#eq? @_identifier "else"))) @indent.branch
29-
30-
(mustache_statement
31-
((identifier) @_identifier
32-
(#eq? @_identifier "else"))) @indent.branch
25+
(block_statement_inverse) @indent.branch
3326

3427
(comment_statement) @indent.ignore

tree-sitter-glimmer.wasm

27.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)