mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
Go locals: range_clause can define variables
```go
for _, num := range numbers {
fmt.Print(num, " ")
}
```
This commit is contained in:
parent
599bec3890
commit
b7a4c97feb
1 changed files with 5 additions and 0 deletions
|
|
@ -23,6 +23,11 @@
|
|||
(parameter_declaration (identifier) @definition.var)
|
||||
(variadic_parameter_declaration (identifier) @definition.var)
|
||||
|
||||
(for_statement
|
||||
(range_clause
|
||||
left: (expression_list
|
||||
(identifier) @definition.var)))
|
||||
|
||||
(type_declaration
|
||||
(type_spec
|
||||
name: (type_identifier) @definition.type))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue