@willbooster/tree-sitter-kotlin 1.5.3 → 1.5.4
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 +17 -12
- package/package.json +1 -1
- package/tree-sitter-kotlin.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -370,19 +370,24 @@ module.exports = grammar({
|
|
|
370
370
|
statement: ($) =>
|
|
371
371
|
choice($.declaration, $.assignment, $.for_statement, $.while_statement, $.do_while_statement, $.expression),
|
|
372
372
|
|
|
373
|
+
// An annotation before a declaration may also read as an annotated expression statement (`@A (b)`), and both
|
|
374
|
+
// readings parse, so the one in which it modifies the declaration takes dynamic precedence, as in Kotlin.
|
|
373
375
|
modifiers: ($) =>
|
|
374
|
-
prec.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
376
|
+
prec.dynamic(
|
|
377
|
+
1,
|
|
378
|
+
prec.right(
|
|
379
|
+
repeat1(
|
|
380
|
+
choice(
|
|
381
|
+
$.annotation,
|
|
382
|
+
$.class_modifier,
|
|
383
|
+
$.member_modifier,
|
|
384
|
+
$.function_modifier,
|
|
385
|
+
$.property_modifier,
|
|
386
|
+
$.visibility_modifier,
|
|
387
|
+
$.inheritance_modifier,
|
|
388
|
+
$.parameter_modifier,
|
|
389
|
+
$.platform_modifier
|
|
390
|
+
)
|
|
386
391
|
)
|
|
387
392
|
)
|
|
388
393
|
),
|
package/package.json
CHANGED
package/tree-sitter-kotlin.wasm
CHANGED
|
Binary file
|