aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/php_spec.lua
diff options
context:
space:
mode:
authorRobert Jackson <rjackson@linkedin.com>2023-09-08 16:02:29 -0400
committerAmaan Qureshi <amaanq12@gmail.com>2023-10-15 14:33:21 -0400
commit262e9b1e867ad30ff2cd433160b879d5ec4b3769 (patch)
tree79f6bf0548713860019e06ec4d265120012062c5 /tests/indent/php_spec.lua
parentfeat(haskell): highlights improvements (diff)
downloadnvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.tar
nvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.tar.gz
nvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.tar.bz2
nvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.tar.lz
nvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.tar.xz
nvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.tar.zst
nvim-treesitter-262e9b1e867ad30ff2cd433160b879d5ec4b3769.zip
fix(scala): Mark (lambda_expression) without bindings as @defintition.parameters
When you have a lambda expression like: ```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 `fruit => fruit.count(_ == 'a')` lambda expression (note: without wrapping parenthesis) does not create a `(binding)` node. Its syntax tree is: ``` (lambda_expression) ; [5:18 - 47] parameters: (identifier) ; [5:18 - 22] (call_expression) ; [5:27 - 47] function: (field_expression) ; [5:27 - 37] value: (identifier) ; [5:27 - 31] field: (identifier) ; [5:33 - 37] arguments: (arguments) ; [5:38 - 47] (infix_expression) ; [5:39 - 46] left: (wildcard) ; [5:39 - 39] operator: (operator_identifier) ; [5:41 - 42] right: (character_literal) ; [5:44 - 46] ``` That example just _happens_ to be **exactly** one of the example from https://www.scala-lang.org/ ([see playground](https://scastie.scala-lang.org/S0bkCiXkQiuOMXnlhWn46g)) 😁.
Diffstat (limited to 'tests/indent/php_spec.lua')
0 files changed, 0 insertions, 0 deletions