@willbooster/tree-sitter-java 7.0.4 → 8.0.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 +3 -1
- package/grammar.js +4 -1
- package/package.json +1 -1
- package/src/node-types.json +4 -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
|
),
|
|
@@ -1140,6 +1142,7 @@ module.exports = grammar({
|
|
|
1140
1142
|
$.annotation_type_element_declaration,
|
|
1141
1143
|
$.constant_declaration,
|
|
1142
1144
|
$.class_declaration,
|
|
1145
|
+
$.record_declaration,
|
|
1143
1146
|
$.interface_declaration,
|
|
1144
1147
|
$.enum_declaration,
|
|
1145
1148
|
$.annotation_type_declaration,
|
package/package.json
CHANGED
package/src/node-types.json
CHANGED
|
@@ -470,6 +470,10 @@
|
|
|
470
470
|
{
|
|
471
471
|
"type": "interface_declaration",
|
|
472
472
|
"named": true
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"type": "record_declaration",
|
|
476
|
+
"named": true
|
|
473
477
|
}
|
|
474
478
|
]
|
|
475
479
|
}
|
|
@@ -4349,10 +4353,6 @@
|
|
|
4349
4353
|
"type": "@",
|
|
4350
4354
|
"named": false
|
|
4351
4355
|
},
|
|
4352
|
-
{
|
|
4353
|
-
"type": "@interface",
|
|
4354
|
-
"named": false
|
|
4355
|
-
},
|
|
4356
4356
|
{
|
|
4357
4357
|
"type": "[",
|
|
4358
4358
|
"named": false
|
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|