Skip to content

Commit

Permalink
Add basic TS typescript queries re #156
Browse files Browse the repository at this point in the history
  • Loading branch information
andymass committed Feb 13, 2022
1 parent 2acaf94 commit 71739b5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions after/queries/typescript/matchup.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
; switch case
(switch_statement "switch" @open.switch) @scope.switch
(switch_case "case" @mid.switch.1)
(switch_default "default" @mid.switch.2)

; 'else' and 'else if'
(else_clause
"else" @_start (if_statement "if" @_end)?
(#make-range! "mid.if.1" @_start @_end))

; if
((if_statement
"if" @open.if) @scope.if
(#not-has-parent? @scope.if else_clause))

0 comments on commit 71739b5

Please sign in to comment.