@willbooster/tree-sitter-kotlin 1.6.6 → 1.7.1
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/README.md +0 -2
- package/grammar.js +3 -0
- package/package.json +6 -6
- package/src/node-types.json +10 -0
- package/tree-sitter-kotlin.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -107,8 +107,6 @@ the download fails or the release has no binary that runs here.
|
|
|
107
107
|
(ten times the lines take about ten times the CPU time, under a ceiling), since consumers parse files while they are
|
|
108
108
|
being edited. It loads the Wasm build through @willbooster/web-tree-sitter, which `bun run build/ci` rebuilds after
|
|
109
109
|
regenerating the parser;
|
|
110
|
-
- a check that comments, strings, escapes, string templates, character literals, and shebang lines containing NUL
|
|
111
|
-
characters parse (`test/unit/nulCharacters.test.ts`);
|
|
112
110
|
- a check that `package.json` and `Cargo.lock` test the same runtime version (`test/unit/runtimeVersion.test.ts`);
|
|
113
111
|
- checks that the Wasm build parses Kotlin through @willbooster/web-tree-sitter in Chromium
|
|
114
112
|
(`test/unit/browser.test.ts`) and in Cloudflare Workers with and without Node.js compatibility
|
package/grammar.js
CHANGED
|
@@ -23,6 +23,7 @@ module.exports = grammar({
|
|
|
23
23
|
name: 'kotlin',
|
|
24
24
|
|
|
25
25
|
conflicts: ($) => [
|
|
26
|
+
[$.if_expression, $.parenthesized_expression],
|
|
26
27
|
[$.class_body, $.enum_class_body],
|
|
27
28
|
|
|
28
29
|
[$.binary_expression, $.call_expression],
|
|
@@ -125,6 +126,7 @@ module.exports = grammar({
|
|
|
125
126
|
$._keyword_reference,
|
|
126
127
|
// never scanned: see `_template_name`
|
|
127
128
|
$._keyword_reference_end,
|
|
129
|
+
'where',
|
|
128
130
|
],
|
|
129
131
|
|
|
130
132
|
inline: ($) => [$._statements, $._identifier, $._control_structure_body],
|
|
@@ -773,6 +775,7 @@ module.exports = grammar({
|
|
|
773
775
|
when_entry: ($) =>
|
|
774
776
|
seq(
|
|
775
777
|
choice(seq(commaSep1(field('condition', $._when_condition)), optional(',')), 'else'),
|
|
778
|
+
optional(seq('if', field('guard', $.expression))),
|
|
776
779
|
'->',
|
|
777
780
|
field('body', choice($.block, $.statement)),
|
|
778
781
|
optional($._semi)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-kotlin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Kotlin grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@tsconfig/bun": "1.0.11",
|
|
43
43
|
"@types/bun": "1.4.2",
|
|
44
|
-
"@vitest/browser-playwright": "5.0.
|
|
44
|
+
"@vitest/browser-playwright": "5.0.2",
|
|
45
45
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
46
46
|
"@willbooster/oxlint-config": "1.4.8",
|
|
47
|
-
"@willbooster/wb": "22.
|
|
47
|
+
"@willbooster/wb": "22.18.0",
|
|
48
48
|
"@willbooster/web-tree-sitter": "1.0.16",
|
|
49
49
|
"conventional-changelog-conventionalcommits": "10.4.0",
|
|
50
50
|
"lefthook": "2.1.14",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"sort-package-json": "4.0.0",
|
|
57
57
|
"tree-sitter-cli": "0.27.0",
|
|
58
58
|
"typescript": "7.0.2",
|
|
59
|
-
"vite": "8.3.
|
|
60
|
-
"vitest": "5.0.
|
|
61
|
-
"wrangler": "4.
|
|
59
|
+
"vite": "8.3.1",
|
|
60
|
+
"vitest": "5.0.2",
|
|
61
|
+
"wrangler": "4.141.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@willbooster/web-tree-sitter": "^1.0.0"
|
package/src/node-types.json
CHANGED
package/tree-sitter-kotlin.wasm
CHANGED
|
Binary file
|