@willbooster/tree-sitter-java 7.0.3 → 8.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 +3 -1
- package/grammar.js +5 -3
- package/package.json +1 -1
- package/src/node-types.json +0 -4
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -18,6 +18,8 @@ pattern variables use `underscore_pattern` nodes. Binding annotations are direct
|
|
|
18
18
|
`instanceof_expression`, or `record_pattern_component`; an `instanceof` type test without a binding keeps its
|
|
19
19
|
annotations inside the `right` field's `annotated_type` node.
|
|
20
20
|
|
|
21
|
+
Annotation interface declarations expose separate `@` and `interface` tokens.
|
|
22
|
+
|
|
21
23
|
The parser ships as compact tables under the [WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter)
|
|
22
24
|
fork's ABI (`0x57420007`). This package is tested with runtime 9.0.0. Runtimes with a different ABI, including
|
|
23
25
|
upstream's tree-sitter, reject the parser.
|
|
@@ -84,7 +86,7 @@ fuzzed with:
|
|
|
84
86
|
```toml
|
|
85
87
|
[dependencies]
|
|
86
88
|
tree-sitter = { package = "willbooster-tree-sitter", version = "9.0.0" }
|
|
87
|
-
tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "
|
|
89
|
+
tree-sitter-java = { package = "willbooster-tree-sitter-java", version = "8" }
|
|
88
90
|
```
|
|
89
91
|
|
|
90
92
|
```rust
|
package/grammar.js
CHANGED
|
@@ -68,6 +68,7 @@ module.exports = grammar({
|
|
|
68
68
|
],
|
|
69
69
|
|
|
70
70
|
conflicts: $ => [
|
|
71
|
+
[$.modifiers],
|
|
71
72
|
[$._literal, $.switch_label],
|
|
72
73
|
[$.dimensions],
|
|
73
74
|
[$.array_type, $._unannotated_type],
|
|
@@ -1129,7 +1130,8 @@ module.exports = grammar({
|
|
|
1129
1130
|
|
|
1130
1131
|
annotation_type_declaration: $ => seq(
|
|
1131
1132
|
optional($.modifiers),
|
|
1132
|
-
'@
|
|
1133
|
+
'@',
|
|
1134
|
+
'interface',
|
|
1133
1135
|
field('name', $.identifier),
|
|
1134
1136
|
field('body', $.annotation_type_body),
|
|
1135
1137
|
),
|
|
@@ -1385,8 +1387,8 @@ module.exports = grammar({
|
|
|
1385
1387
|
|
|
1386
1388
|
super: _ => 'super',
|
|
1387
1389
|
|
|
1388
|
-
//
|
|
1389
|
-
identifier: _ => /[\p{
|
|
1390
|
+
// Unicode 17 additions supplement the generator's Unicode 16 category tables.
|
|
1391
|
+
identifier: _ => /[\p{L}\p{Nl}\p{Sc}\p{Pc}\u{88F}\u{C5C}\u{CDC}\u{20C1}\u{A7CE}-\u{A7CF}\u{A7D2}\u{A7D4}\u{A7F1}\u{10940}-\u{10959}\u{10EC5}-\u{10EC7}\u{11DB0}-\u{11DDB}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16FF2}-\u{16FF6}\u{187F8}-\u{187FF}\u{18D09}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6E2}\u{1E6E4}-\u{1E6E5}\u{1E6E7}-\u{1E6ED}\u{1E6F0}-\u{1E6F4}\u{1E6FE}-\u{1E6FF}\u{2B73A}-\u{2B73F}\u{2CEA2}-\u{2CEAD}\u{323B0}-\u{33479}][\p{L}\p{Nl}\p{Sc}\p{Pc}\p{Nd}\p{Mc}\p{Mn}\p{Cf}\u0000-\u0008\u000E-\u001B\u007F-\u009F\u{88F}\u{C5C}\u{CDC}\u{1ACF}-\u{1ADD}\u{1AE0}-\u{1AEB}\u{20C1}\u{A7CE}-\u{A7CF}\u{A7D2}\u{A7D4}\u{A7F1}\u{10940}-\u{10959}\u{10EC5}-\u{10EC7}\u{10EFA}-\u{10EFB}\u{11B60}-\u{11B67}\u{11DB0}-\u{11DDB}\u{11DE0}-\u{11DE9}\u{16EA0}-\u{16EB8}\u{16EBB}-\u{16ED3}\u{16FF2}-\u{16FF6}\u{187F8}-\u{187FF}\u{18D09}-\u{18D1E}\u{18D80}-\u{18DF2}\u{1E6C0}-\u{1E6DE}\u{1E6E0}-\u{1E6F5}\u{1E6FE}-\u{1E6FF}\u{2B73A}-\u{2B73F}\u{2CEA2}-\u{2CEAD}\u{323B0}-\u{33479}]*/u,
|
|
1390
1392
|
|
|
1391
1393
|
line_comment: _ => token(prec(PREC.COMMENT, seq('//', /[^\n]*/))),
|
|
1392
1394
|
|
package/package.json
CHANGED
package/src/node-types.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|