2024-05-03 01:13:43 +02:00
|
|
|
[
|
|
|
|
|
(method)
|
|
|
|
|
(block)
|
|
|
|
|
] @local.scope
|
|
|
|
|
|
2025-05-21 21:47:18 +02:00
|
|
|
((method
|
|
|
|
|
name: _ @local.definition.method) @local.scope
|
|
|
|
|
(#set! definition.function.scope "parent"))
|
2024-05-03 01:13:43 +02:00
|
|
|
|
|
|
|
|
(external_function
|
|
|
|
|
name: _ @local.definition.function)
|
|
|
|
|
|
|
|
|
|
(argument
|
|
|
|
|
name: _ @local.definition.parameter)
|
|
|
|
|
|
2025-10-07 02:25:25 +02:00
|
|
|
(identifier_pattern
|
2024-05-03 01:13:43 +02:00
|
|
|
name: _ @local.definition.var)
|
|
|
|
|
|
|
|
|
|
(define_constant
|
|
|
|
|
name: _ @local.definition.constant)
|
|
|
|
|
|
|
|
|
|
(define_field
|
|
|
|
|
name: _ @local.definition.field)
|
|
|
|
|
|
|
|
|
|
(named_argument
|
|
|
|
|
name: _ @local.definition.parameter)
|
|
|
|
|
|
2025-05-21 21:47:18 +02:00
|
|
|
((class
|
2024-05-03 01:13:43 +02:00
|
|
|
modifier: (modifier
|
|
|
|
|
"enum")
|
2025-05-21 21:47:18 +02:00
|
|
|
name: _ @local.definition.enum) @local.scope
|
|
|
|
|
(#set! definition.type.scope "parent"))
|
2024-05-03 01:13:43 +02:00
|
|
|
|
|
|
|
|
(class
|
|
|
|
|
modifier: (modifier
|
|
|
|
|
"enum")
|
|
|
|
|
body: (class_body
|
|
|
|
|
(define_case
|
|
|
|
|
name: _ @local.definition.field)))
|
|
|
|
|
|
2025-05-21 21:47:18 +02:00
|
|
|
((class
|
|
|
|
|
name: _ @local.definition.type) @local.scope
|
|
|
|
|
(#set! definition.type.scope "parent"))
|
2024-05-03 01:13:43 +02:00
|
|
|
|
2025-05-21 21:47:18 +02:00
|
|
|
((trait
|
|
|
|
|
name: _ @local.definition.type) @local.scope
|
|
|
|
|
(#set! definition.type.scope "parent"))
|
2024-05-03 01:13:43 +02:00
|
|
|
|
|
|
|
|
(import
|
|
|
|
|
(symbols
|
|
|
|
|
[
|
|
|
|
|
(identifier)
|
|
|
|
|
(constant)
|
|
|
|
|
(self)
|
|
|
|
|
] @local.definition.import))
|
|
|
|
|
|
|
|
|
|
(identifier) @local.reference
|
|
|
|
|
|
|
|
|
|
(field) @local.reference
|
|
|
|
|
|
|
|
|
|
(constant) @local.reference
|