Skip to content

Commit d9e39f8

Browse files
author
fidgetingbits
committed
Support switch cases
1 parent 23e219b commit d9e39f8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

queries/shellscript.scm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
;; Conditionals
2626
;;
2727

28-
(if_statement) @ifStatement @branch.iteration
29-
30-
;; Conditional
28+
(if_statement) @ifStatement @branch.iteration @condition.iteration
3129

3230
;;!! if [ $value -le 0 ]; then
3331
;;!! fi
@@ -141,6 +139,13 @@
141139
condition: (_) @condition
142140
)
143141

142+
(case_statement) @branch.iteration @condition.iteration
143+
(case_item
144+
value: (_) @condition @branch.interior.start.startOf
145+
;; FIXME: See how to escape this..
146+
";;" @branch.interior.end.endOf
147+
) @branch @_.domain
148+
144149
;; Lists and maps
145150
;;
146151

0 commit comments

Comments
 (0)