2024-06-07 21:29:42 +04:00
|
|
|
; Upstream: https://github.com/alex-pinkus/tree-sitter-swift/blob/57c1c6d6ffa1c44b330182d41717e6fe37430704/queries/locals.scm
|
|
|
|
(import_declaration (identifier) @definition.import)
|
|
|
|
(function_declaration name: (simple_identifier) @definition.function)
|
|
|
|
|
|
|
|
; Scopes
|
2022-04-08 22:10:37 +04:00
|
|
|
[
|
2024-06-07 21:29:42 +04:00
|
|
|
(for_statement)
|
|
|
|
(while_statement)
|
|
|
|
(repeat_while_statement)
|
|
|
|
(do_statement)
|
|
|
|
(if_statement)
|
|
|
|
(guard_statement)
|
|
|
|
(switch_statement)
|
|
|
|
(property_declaration)
|
2022-04-08 22:10:37 +04:00
|
|
|
(function_declaration)
|
2024-06-07 21:29:42 +04:00
|
|
|
(class_declaration)
|
|
|
|
(protocol_declaration)
|
|
|
|
(lambda_literal)
|
2022-08-17 05:40:21 +04:00
|
|
|
] @local.scope
|