nvim-treesitter/runtime/queries/puppet/locals.scm

65 lines
980 B
Scheme
Raw Normal View History

2023-04-26 07:32:41 -04:00
; Scopes
[
(block)
(defined_resource_type)
(parameter_list)
(attribute_type_entry)
(class_definition)
(node_definition)
(resource_declaration)
(selector)
2024-02-18 10:03:44 -05:00
(iterator_statement)
2023-04-26 07:32:41 -04:00
(case_statement)
(hash)
(array)
] @local.scope
2023-04-26 07:32:41 -04:00
; References
[
(identifier)
(class_identifier)
2024-01-06 15:05:50 +09:00
(variable)
] @local.reference
2023-04-26 07:32:41 -04:00
; Definitions
2024-01-06 15:05:50 +09:00
(attribute
[
(identifier)
(variable)
] @local.definition.field)
2023-04-26 07:32:41 -04:00
(function_declaration
2024-01-06 15:05:50 +09:00
[
(identifier)
(class_identifier)
] @local.definition.function)
2023-04-26 07:32:41 -04:00
2024-01-06 15:05:50 +09:00
(include_statement
[
(identifier)
(class_identifier)
] @local.definition.import)
2023-04-26 07:32:41 -04:00
2024-01-06 15:05:50 +09:00
(parameter
(variable) @local.definition.parameter)
2023-04-26 07:32:41 -04:00
(class_definition
2024-01-06 15:05:50 +09:00
[
(identifier)
(class_identifier)
] @local.definition.type)
2023-04-26 07:32:41 -04:00
(node_definition
2024-01-06 15:05:50 +09:00
(node_name
(identifier) @local.definition.type))
2023-04-26 07:32:41 -04:00
(resource_declaration
2024-01-06 15:05:50 +09:00
[
(identifier)
(class_identifier)
] @local.definition.type)
2023-04-26 07:32:41 -04:00
2024-01-06 15:05:50 +09:00
(assignment
.
(variable) @local.definition.var)