Skip to content

Commit

Permalink
add fish queries (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
wisp3rwind committed May 19, 2024
1 parent 838652d commit ff3bea6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions after/queries/fish/matchup.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
(if_statement
"if" @open.if
(else_if_clause ("else" "if") @mid.if.1)?
(else_clause "else" @mid.if.2)?
"end" @close.if
) @scope.if

(switch_statement
"switch" @open.switch
(case_clause "case" @mid.switch.1)?
"end" @close.switch
) @scope.switch

(for_statement
"for" @open.loop
"in" @mid.loop.1
"end" @close.loop) @scope.loop
((break) @mid.loop.2)?
((continue) @mid.loop.3)?

(while_statement
"while" @open.loop
"end" @close.loop) @scope.loop

(begin_statement
"begin" @open.block
"end" @close.block) @scope.block

(function_definition
"function" @open.func
"end" @close.func) @scope.func
(return "return" @mid.func.1)

0 comments on commit ff3bea6

Please sign in to comment.