@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 +6 -0
- package/package.json +11 -11
- package/queries/injections.scm +9 -0
- package/tree-sitter-rust.wasm +0 -0
- package/tree-sitter.json +1 -1
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.
|
|
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.
|
|
50
|
-
"@willbooster/web-tree-sitter": "2.0.
|
|
51
|
-
"conventional-changelog-conventionalcommits": "10.4.
|
|
52
|
-
"lefthook": "2.1
|
|
53
|
-
"oxfmt": "0.
|
|
54
|
-
"oxlint": "1.
|
|
55
|
-
"oxlint-tsgolint": "7.0.
|
|
56
|
-
"playwright": "1.
|
|
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.
|
|
60
|
+
"vite": "8.3.4",
|
|
61
61
|
"vitest": "5.0.3",
|
|
62
|
-
"wrangler": "4.
|
|
62
|
+
"wrangler": "4.149.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@willbooster/web-tree-sitter": "^2.0.0"
|
package/queries/injections.scm
CHANGED
|
@@ -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"))
|
package/tree-sitter-rust.wasm
CHANGED
|
Binary file
|