helix/runtime/queries/just/locals.scm

38 lines
695 B
Scheme
Raw Normal View History

; This file tells us about the scope of variables so e.g. local
; variables override global functions with the same name
; Scope
(recipe) @local.scope
; Definitions
(alias
2025-02-25 01:46:34 +08:00
name: (identifier) @local.definition.variable)
(assignment
2025-02-25 01:46:34 +08:00
name: (identifier) @local.definition.variable)
(mod
2025-02-25 01:46:34 +08:00
name: (identifier) @local.definition.namespace)
(recipe_parameter
2025-02-25 01:46:34 +08:00
name: (identifier) @local.definition.variable.parameter)
(recipe
2025-02-25 01:46:34 +08:00
name: (identifier) @local.definition.function)
; References
(alias
name: (identifier) @local.reference)
(function_call
name: (identifier) @local.reference)
(recipe_dependency
name: (identifier) @local.reference)
(value
(identifier) @local.reference)