@willbooster/tree-sitter-rust 3.1.10 → 3.2.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
@@ -60,6 +60,12 @@ parser.setLanguage(await Language.load(rust));
60
60
 
61
61
  The package also ships the queries in `queries/` and the node types in `src/node-types.json`.
62
62
 
63
+ Documentation-comment injections require a host with Markdown parsing and fenced-language injections.
64
+ Line documentation is combined across the syntax tree; an unclosed fence can affect later comments.
65
+ Each block comment is a separate Markdown document. Its content is passed through unchanged, including
66
+ leading `*` gutters, which remain Markdown text and can prevent fence recognition. Use unguttered block
67
+ documentation or line documentation for fenced examples with these queries.
68
+
63
69
  In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-rust) and on
64
70
  [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
65
71
  fuzzed with. The parser loads only with that runtime, version 2.0.0 or later; upstream's `tree-sitter` crate rejects it:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "3.1.10",
3
+ "version": "3.2.0",
4
4
  "description": "Rust grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -46,20 +46,20 @@
46
46
  "@vitest/browser-playwright": "5.0.3",
47
47
  "@willbooster/oxfmt-config": "1.2.2",
48
48
  "@willbooster/oxlint-config": "1.4.8",
49
- "@willbooster/wb": "22.24.0",
50
- "@willbooster/web-tree-sitter": "2.0.1",
51
- "conventional-changelog-conventionalcommits": "10.4.0",
52
- "lefthook": "2.1.16",
53
- "oxfmt": "0.71.0",
54
- "oxlint": "1.86.0",
55
- "oxlint-tsgolint": "7.0.2003",
56
- "playwright": "1.63.0",
49
+ "@willbooster/wb": "22.26.1",
50
+ "@willbooster/web-tree-sitter": "2.0.24",
51
+ "conventional-changelog-conventionalcommits": "10.4.1",
52
+ "lefthook": "2.2.1",
53
+ "oxfmt": "0.72.0",
54
+ "oxlint": "1.87.0",
55
+ "oxlint-tsgolint": "7.0.2004",
56
+ "playwright": "1.64.0",
57
57
  "semantic-release": "25.0.9",
58
58
  "sort-package-json": "4.0.0",
59
59
  "typescript": "7.0.2",
60
- "vite": "8.3.2",
60
+ "vite": "8.3.4",
61
61
  "vitest": "5.0.3",
62
- "wrangler": "4.147.0"
62
+ "wrangler": "4.149.0"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@willbooster/web-tree-sitter": "^2.0.0"
@@ -13,3 +13,12 @@
13
13
  body: (token_tree) @injection.content)
14
14
  (#set! injection.language "rust")
15
15
  (#set! injection.include-children))
16
+
17
+ ((line_comment
18
+ doc: (doc_comment) @injection.content)
19
+ (#set! injection.language "markdown")
20
+ (#set! injection.combined))
21
+
22
+ ((block_comment
23
+ doc: (doc_comment) @injection.content)
24
+ (#set! injection.language "markdown"))
Binary file
package/tree-sitter.json CHANGED
@@ -25,7 +25,7 @@
25
25
  }
26
26
  ],
27
27
  "metadata": {
28
- "version": "3.1.10",
28
+ "version": "3.2.0",
29
29
  "license": "MIT",
30
30
  "description": "Rust grammar for tree-sitter",
31
31
  "authors": [