summaryrefslogtreecommitdiffstats
path: root/queries/puppet/locals.scm
blob: d9d903a4699a674fc80c901b3f8f39c582e82933 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
; Scopes

[
  (block)
  (defined_resource_type)
  (parameter_list)
  (attribute_type_entry)
  (class_definition)
  (node_definition)
  (resource_declaration)
  (selector)
  (method_call)
  (case_statement)
  (hash)
  (array)
] @scope

; References

[
  (identifier)
  (class_identifier)
  (variable) 
] @reference

; Definitions

(attribute [(identifier) (variable)] @definition.field)

(function_declaration
  [(identifier) (class_identifier)] @definition.function)

(include_statement [(identifier) (class_identifier)] @definition.import)

(parameter (variable) @definition.parameter)

(class_definition
  [(identifier) (class_identifier)] @definition.type)

(node_definition
  (node_name (identifier) @definition.type))

(resource_declaration
  [(identifier) (class_identifier)] @definition.type)

(assignment . (variable) @definition.var)