@willbooster/tree-sitter-go 3.1.0 → 4.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 +5 -5
- package/package.json +8 -8
- package/queries/tags.scm +2 -2
- package/tree-sitter-go.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-go/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/WillBooster/tree-sitter-go/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-go)
|
|
10
10
|
|
|
11
11
|
Go grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
|
@@ -14,13 +14,13 @@ to its authors and contributors. This is not an official release of that project
|
|
|
14
14
|
|
|
15
15
|
This fork extends upstream's version 0.25.0 grammar with method type parameters and generates the parser with the
|
|
16
16
|
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser carries that fork's own ABI
|
|
17
|
-
number (`
|
|
17
|
+
number (`0x57420007`), so it loads only with the WillBooster runtime, version 10.0.2 or later within 10.x
|
|
18
18
|
(`willbooster-tree-sitter`, `@willbooster/web-tree-sitter`), and not with upstream's tree-sitter.
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
22
|
The npm package ships `tree-sitter-go.wasm` for
|
|
23
|
-
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version
|
|
23
|
+
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 10.0.2 or later within 10.x, which runs in Node.js, Bun, browsers, and Cloudflare Workers. In Node.js and Bun, load the grammar from its path:
|
|
24
24
|
|
|
25
25
|
```js
|
|
26
26
|
import { fileURLToPath } from 'node:url';
|
|
@@ -66,8 +66,8 @@ fuzzed with:
|
|
|
66
66
|
|
|
67
67
|
```toml
|
|
68
68
|
[dependencies]
|
|
69
|
-
tree-sitter = { package = "willbooster-tree-sitter", version = "
|
|
70
|
-
tree-sitter-go = { package = "willbooster-tree-sitter-go", version = "
|
|
69
|
+
tree-sitter = { package = "willbooster-tree-sitter", version = "10.0.2" }
|
|
70
|
+
tree-sitter-go = { package = "willbooster-tree-sitter-go", version = "4" }
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
```rust
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-go",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Go grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@tsconfig/bun": "1.0.11",
|
|
45
|
-
"@types/bun": "1.4.
|
|
45
|
+
"@types/bun": "1.4.3",
|
|
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.26.
|
|
50
|
-
"@willbooster/web-tree-sitter": "
|
|
49
|
+
"@willbooster/wb": "22.26.2",
|
|
50
|
+
"@willbooster/web-tree-sitter": "10.0.2",
|
|
51
51
|
"conventional-changelog-conventionalcommits": "10.4.1",
|
|
52
|
-
"lefthook": "2.2.
|
|
53
|
-
"oxfmt": "0.
|
|
54
|
-
"oxlint": "1.
|
|
52
|
+
"lefthook": "2.2.2",
|
|
53
|
+
"oxfmt": "0.73.0",
|
|
54
|
+
"oxlint": "1.88.0",
|
|
55
55
|
"oxlint-tsgolint": "7.0.2004",
|
|
56
56
|
"playwright": "1.64.0",
|
|
57
57
|
"semantic-release": "25.0.9",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"wrangler": "4.149.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@willbooster/web-tree-sitter": "^
|
|
63
|
+
"@willbooster/web-tree-sitter": "^10.0.2"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
66
66
|
"@willbooster/web-tree-sitter": {
|
package/queries/tags.scm
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(function_declaration
|
|
5
5
|
name: (identifier) @name) @definition.function
|
|
6
6
|
(#strip! @doc "^//\\s*")
|
|
7
|
-
(#
|
|
7
|
+
(#select-adjacent! @doc @definition.function)
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
(
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
(method_declaration
|
|
14
14
|
name: (field_identifier) @name) @definition.method
|
|
15
15
|
(#strip! @doc "^//\\s*")
|
|
16
|
-
(#
|
|
16
|
+
(#select-adjacent! @doc @definition.method)
|
|
17
17
|
)
|
|
18
18
|
|
|
19
19
|
(call_expression
|
package/tree-sitter-go.wasm
CHANGED
|
Binary file
|