summaryrefslogtreecommitdiff
path: root/queries/teal/locals.scm
blob: 431e659a171d7ad8e03949200b01a6c35b49119f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(var_declaration
  declarators: (var_declarators
  (var (identifier)) @definition.var))

(var_assignment
  variables: (assignment_variables
    (var (identifier) @definition.var) @definition.associated))

(arg name: (identifier) @definition.parameter)

(anon_function) @scope
((function_statement
  (function_name) @definition.function) @scope)

(program) @scope
(if_statement) @scope
(generic_for_statement (for_body) @scope)
(numeric_for_statement (for_body) @scope)
(repeat_statement) @scope
(while_statement (while_body) @scope)
(do_statement) @scope

(identifier) @reference