@willbooster/tree-sitter-dart 5.0.0 → 7.0.0
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 +5 -5
- package/grammar.js +4 -6
- package/package.json +3 -3
- package/src/node-types.json +4 -0
- package/tree-sitter-dart.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ Dart grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), fork
|
|
|
13
13
|
to its authors and contributors. This is not an official release of that project.
|
|
14
14
|
|
|
15
15
|
This fork extends upstream's version 0.2.0 grammar, retains its external scanner, and generates the parser with the
|
|
16
|
-
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser carries that fork's own ABI number (`
|
|
17
|
-
version
|
|
16
|
+
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser carries that fork's own ABI number (`0x5742000b`), so it loads only with the fork's runtime,
|
|
17
|
+
version 15.0.0 or later in the 15.x series; upstream's runtime rejects it, and the fork's runtime rejects parsers generated by upstream's CLI.
|
|
18
18
|
|
|
19
19
|
## Differences from upstream's parser
|
|
20
20
|
|
|
@@ -31,7 +31,7 @@ Known differences from upstream's 0.2.0 parser include:
|
|
|
31
31
|
## Usage
|
|
32
32
|
|
|
33
33
|
The npm package ships `tree-sitter-dart.wasm` for
|
|
34
|
-
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version
|
|
34
|
+
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 15.0.0 or later in the 15.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
|
|
35
35
|
In Node.js and Bun, load the grammar from its path:
|
|
36
36
|
|
|
37
37
|
```js
|
|
@@ -79,8 +79,8 @@ fuzzed with:
|
|
|
79
79
|
|
|
80
80
|
```toml
|
|
81
81
|
[dependencies]
|
|
82
|
-
tree-sitter = { package = "willbooster-tree-sitter", version = "
|
|
83
|
-
tree-sitter-dart = { package = "willbooster-tree-sitter-dart", version = "
|
|
82
|
+
tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" }
|
|
83
|
+
tree-sitter-dart = { package = "willbooster-tree-sitter-dart", version = "7" }
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
```rust
|
package/grammar.js
CHANGED
|
@@ -1130,12 +1130,10 @@ module.exports = grammar({
|
|
|
1130
1130
|
multiplicative_expression: ($) =>
|
|
1131
1131
|
prec.left(
|
|
1132
1132
|
PREC.MULTIPLICATIVE,
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
),
|
|
1138
|
-
seq("super", repeat1(seq(choice("*", "/", "%", "~/"), $._unary_expression))),
|
|
1133
|
+
seq(
|
|
1134
|
+
choice($._unary_expression, $.multiplicative_expression, "super"),
|
|
1135
|
+
choice("*", "/", "%", "~/"),
|
|
1136
|
+
$._unary_expression,
|
|
1139
1137
|
),
|
|
1140
1138
|
),
|
|
1141
1139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-dart",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Dart grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dart",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@vitest/browser-playwright": "5.0.5",
|
|
51
51
|
"@willbooster/oxlint-config": "1.4.9",
|
|
52
52
|
"@willbooster/wb": "22.29.3",
|
|
53
|
-
"@willbooster/web-tree-sitter": "
|
|
53
|
+
"@willbooster/web-tree-sitter": "15.0.0",
|
|
54
54
|
"conventional-changelog-conventionalcommits": "10.4.1",
|
|
55
55
|
"lefthook": "2.2.2",
|
|
56
56
|
"oxlint": "1.88.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"wrangler": "4.151.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@willbooster/web-tree-sitter": "^
|
|
64
|
+
"@willbooster/web-tree-sitter": "^15.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@willbooster/web-tree-sitter": {
|
package/src/node-types.json
CHANGED
|
@@ -10782,6 +10782,10 @@
|
|
|
10782
10782
|
"type": "member_expression",
|
|
10783
10783
|
"named": true
|
|
10784
10784
|
},
|
|
10785
|
+
{
|
|
10786
|
+
"type": "multiplicative_expression",
|
|
10787
|
+
"named": true
|
|
10788
|
+
},
|
|
10785
10789
|
{
|
|
10786
10790
|
"type": "null_assertion_expression",
|
|
10787
10791
|
"named": true
|
package/tree-sitter-dart.wasm
CHANGED
|
Binary file
|