@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 CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Test](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test.yml)
6
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-ruby/actions/workflows/test-rust.yml)
7
7
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8
- [![wbfy](https://img.shields.io/badge/wbfy-20.51.1-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-21.3.0-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
9
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-ruby.svg)](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. Incremental parsing works as in upstream tree-sitter
27
- but is not tested here, and no queries (highlights, locals, injections, tags) are shipped. Node types, field names, and
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
- ```toml
81
- [dependencies]
82
- tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" }
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(choice(seq(/__END__/, $.uninterpreted)))),
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": "7.0.0",
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": "22.32.3",
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.4",
59
+ "vite": "8.3.5",
60
60
  "vitest": "5.0.5",
61
- "wrangler": "4.151.1"
61
+ "wrangler": "4.152.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@willbooster/web-tree-sitter": "^15.0.0"
@@ -4112,6 +4112,10 @@
4112
4112
  "type": "^=",
4113
4113
  "named": false
4114
4114
  },
4115
+ {
4116
+ "type": "__END__",
4117
+ "named": false
4118
+ },
4115
4119
  {
4116
4120
  "type": "`",
4117
4121
  "named": false
Binary file
package/tree-sitter.json CHANGED
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "metadata": {
16
- "version": "7.0.0",
16
+ "version": "9.0.0",
17
17
  "license": "MIT",
18
18
  "description": "Ruby grammar for tree-sitter",
19
19
  "authors": [