@willbooster/tree-sitter-kotlin 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/grammar.js CHANGED
@@ -134,6 +134,8 @@ module.exports = grammar({
134
134
  'where',
135
135
  $._separated_member_start,
136
136
  $._unseparated_member_start,
137
+ $._infix_position,
138
+ $._companion_name_position,
137
139
  ],
138
140
 
139
141
  inline: ($) => [$._statements, $._identifier, $._control_structure_body],
@@ -271,7 +273,7 @@ module.exports = grammar({
271
273
  'companion',
272
274
  'object',
273
275
  optional($._unseparated_member_start),
274
- optional(field('name', $.identifier)),
276
+ optional(seq(optional($._companion_name_position), field('name', $.identifier))),
275
277
  optional(seq(':', $.delegation_specifiers)),
276
278
  optional($.class_body)
277
279
  ),
@@ -705,7 +707,8 @@ module.exports = grammar({
705
707
 
706
708
  range_expression: ($) => prec.left(PREC.RANGE, seq($.expression, choice('..', '..<'), $.expression)),
707
709
 
708
- infix_expression: ($) => prec.left(PREC.INFIX, seq($.expression, $.identifier, $.expression)),
710
+ infix_expression: ($) =>
711
+ prec.left(PREC.INFIX, seq($.expression, optional($._infix_position), $.identifier, $.expression)),
709
712
 
710
713
  // Right-associative so that a trailing lambda after arguments belongs to the same call (`f(x) { … }`), as in
711
714
  // Kotlin, instead of calling the result of `f(x)`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-kotlin",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "Kotlin grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "metadata": {
16
- "version": "1.7.4",
16
+ "version": "1.7.5",
17
17
  "license": "MIT",
18
18
  "description": "Kotlin grammar for tree-sitter",
19
19
  "authors": [