aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/erlang/textobjects.scm
blob: 013629f88309efda9d04b81b1f61f18bb2124ddb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(function_clause
  pattern: (arguments (_)? @parameter.inside)
  body: (_) @function.inside) @function.around

(anonymous_function
  (stab_clause body: (_) @function.inside)) @function.around

(comment (comment_content) @comment.inside) @comment.around

; EUnit test names.
; (CommonTest cases are not recognizable by syntax alone.)
((function_clause
   name: (atom) @_name
   pattern: (arguments (_)? @parameter.inside)
   body: (_) @test.inside) @test.around
 (#match? @_name "_test$"))