@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 +5 -2
- package/package.json +1 -1
- package/tree-sitter-kotlin.wasm +0 -0
- package/tree-sitter.json +1 -1
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: ($) =>
|
|
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
package/tree-sitter-kotlin.wasm
CHANGED
|
Binary file
|