nvim-treesitter/queries/scala
Robert Jackson 4c9da29cbd
fix(scala): add for_expression locals
This change does two main things:

1. Indicate that `(for_expression)`'s introduce a `@scope` (this
   is the scope for the enumerators to be used within the loop).
2. Indicate that the `(identifiers)` within the `(enumerators)` are
   `@definition.var`s.

---

For the following example snippet:

```scala
val fruits = List("apple", "banana", "avocado", "papaya")

val countsToFruits = fruits.groupBy(fruit => fruit.count(_ == 'a'))

for ((count, fruits) <- countsToFruits) {
  println(s"with (fruits) 'a' × $count = $fruits")
}
```

The `count` and `fruits` identifiers are new definitions introduced by
the `for` expressions scope.
2023-10-15 18:43:34 +00:00
..
folds.scm Add scala maintainer 2021-10-07 23:24:45 +02:00
highlights.scm feat(scala): sync highlights with latest upstream (#4926) 2023-06-09 10:15:06 +02:00
injections.scm chore(injections)!: update injection syntax to 0.9 2023-08-12 17:34:15 +02:00
locals.scm fix(scala): add for_expression locals 2023-10-15 18:43:34 +00:00