(function_declaration
  body: (block) @function.inside) @function.outer

(function_expression
  body: (block) @function.inside) @function.outer

(method_declaration
  body: (block) @function.inside) @function.outer

(class_declaration
  body: (class_body) @class.inside) @class.outer

(trait_declaration
  body: (trait_body) @class.inside) @class.outer

(if_statement
  consequence: (block) @conditional.inside) @conditional.outer

(for_statement
  body: (block) @loop.inside) @loop.outer

(while_statement
  body: (block) @loop.inside) @loop.outer

(try_statement
  body: (block) @block.inside) @block.outer

(catch_clause
  body: (block) @block.inside) @block.outer

(parameter) @parameter.inner

(argument_list
  (_) @parameter.inner)

(comment) @comment.outer
(pod_block) @comment.outer
