@willbooster/tree-sitter-ruby 7.0.0 → 9.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 +6 -7
- package/grammar.js +2 -1
- package/package.json +4 -4
- package/src/node-types.json +4 -0
- package/tree-sitter-ruby.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test-rust.yml)
|
|
7
7
|
[](https://github.com/semantic-release/semantic-release)
|
|
8
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
9
9
|
[](https://crates.io/crates/willbooster-tree-sitter-ruby)
|
|
10
10
|
|
|
11
11
|
Ruby grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
|
@@ -23,8 +23,8 @@ code instead of aborting the process.
|
|
|
23
23
|
## Support Scope
|
|
24
24
|
|
|
25
25
|
This fork maintains only full parsing: valid input yields a correct tree, and invalid input yields `ERROR` or `MISSING`
|
|
26
|
-
nodes without crashing, hanging, or taking more than linear time.
|
|
27
|
-
|
|
26
|
+
nodes without crashing, hanging, or taking more than linear time. Parse each input without a previous tree; reusing
|
|
27
|
+
an old tree is unsupported. No queries (highlights, locals, injections, tags) are shipped. Node types, field names, and
|
|
28
28
|
the trees that error recovery produces may change; such changes are released as new major versions.
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
@@ -77,10 +77,9 @@ In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-
|
|
|
77
77
|
[willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
|
|
78
78
|
fuzzed with. The parser requires runtime 15.x:
|
|
79
79
|
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
tree-sitter-ruby = { package = "willbooster-tree-sitter-ruby", version = "6" }
|
|
80
|
+
```sh
|
|
81
|
+
cargo add willbooster-tree-sitter@15.0.0 --rename tree-sitter
|
|
82
|
+
cargo add willbooster-tree-sitter-ruby --rename tree-sitter-ruby
|
|
84
83
|
```
|
|
85
84
|
|
|
86
85
|
```rust
|
package/grammar.js
CHANGED
|
@@ -94,6 +94,7 @@ module.exports = grammar({
|
|
|
94
94
|
$._heredoc_resume,
|
|
95
95
|
$._body_comment,
|
|
96
96
|
$._body_line_break,
|
|
97
|
+
$._end_of_source,
|
|
97
98
|
],
|
|
98
99
|
|
|
99
100
|
extras: ($) => [$.comment, $.heredoc_body, $._heredoc_resume, /\s/, /\\\r?\n/],
|
|
@@ -228,7 +229,7 @@ module.exports = grammar({
|
|
|
228
229
|
],
|
|
229
230
|
|
|
230
231
|
rules: {
|
|
231
|
-
program: ($) => seq(optional($._statements), optional(
|
|
232
|
+
program: ($) => seq(optional($._statements), optional(seq(alias($._end_of_source, '__END__'), $.uninterpreted))),
|
|
232
233
|
|
|
233
234
|
// External extras must yield to the internal lexer after __END__.
|
|
234
235
|
uninterpreted: ($) => choice(/(.|\s)*/, $._uninterpreted),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-ruby",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Ruby grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@types/bun": "1.4.4",
|
|
49
49
|
"@vitest/browser-playwright": "5.0.5",
|
|
50
50
|
"@willbooster/oxlint-config": "1.4.9",
|
|
51
|
-
"@willbooster/wb": "
|
|
51
|
+
"@willbooster/wb": "23.0.2",
|
|
52
52
|
"@willbooster/web-tree-sitter": "15.0.0",
|
|
53
53
|
"conventional-changelog-conventionalcommits": "10.4.1",
|
|
54
54
|
"lefthook": "2.2.2",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"oxlint-tsgolint": "7.0.2005",
|
|
57
57
|
"playwright": "1.64.1",
|
|
58
58
|
"semantic-release": "25.0.9",
|
|
59
|
-
"vite": "8.3.
|
|
59
|
+
"vite": "8.3.5",
|
|
60
60
|
"vitest": "5.0.5",
|
|
61
|
-
"wrangler": "4.
|
|
61
|
+
"wrangler": "4.152.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@willbooster/web-tree-sitter": "^15.0.0"
|
package/src/node-types.json
CHANGED
package/tree-sitter-ruby.wasm
CHANGED
|
Binary file
|