@willbooster/tree-sitter-c 35.0.0 → 37.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
@@ -24,7 +24,7 @@ the trees that error recovery produces may change; such changes are released as
24
24
  ## Usage
25
25
 
26
26
  The npm package ships `tree-sitter-c.wasm` for
27
- [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 19.1.1 or later within 19.x, which runs in Node.js, Bun, browsers, and Cloudflare Workers. The parser carries the ABI number of the WillBooster/tree-sitter generator (`0x5742000c`), so it loads only with that runtime; upstream tree-sitter runtimes reject it. In Node.js and Bun, load the grammar from its path:
27
+ [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 20.0.0 or later within 20.x, which runs in Node.js, Bun, browsers, and Cloudflare Workers. The parser carries the ABI number of the WillBooster/tree-sitter generator (`0x5742000c`), so it loads only with that runtime; upstream tree-sitter runtimes reject it. In Node.js and Bun, load the grammar from its path:
28
28
 
29
29
  ```js
30
30
  import { fileURLToPath } from 'node:url';
@@ -214,7 +214,7 @@ In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-
214
214
  fuzzed with, at the version recorded in `Cargo.lock`:
215
215
 
216
216
  ```sh
217
- cargo add willbooster-tree-sitter@19.1.1 --rename tree-sitter
217
+ cargo add willbooster-tree-sitter@20.0.0 --rename tree-sitter
218
218
  cargo add willbooster-tree-sitter-c --rename tree-sitter-c
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c",
3
- "version": "35.0.0",
3
+ "version": "37.0.0",
4
4
  "description": "C grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "c",
7
- "incremental",
8
7
  "parsing",
9
8
  "tree-sitter"
10
9
  ],
@@ -60,7 +59,7 @@
60
59
  "@vitest/browser-playwright": "5.0.5",
61
60
  "@willbooster/oxlint-config": "1.4.9",
62
61
  "@willbooster/wb": "23.3.0",
63
- "@willbooster/web-tree-sitter": "19.1.1",
62
+ "@willbooster/web-tree-sitter": "20.0.0",
64
63
  "conventional-changelog-conventionalcommits": "10.4.1",
65
64
  "lefthook": "2.2.2",
66
65
  "oxlint": "1.90.0",
@@ -71,7 +70,7 @@
71
70
  "wrangler": "4.156.0"
72
71
  },
73
72
  "peerDependencies": {
74
- "@willbooster/web-tree-sitter": "^19.1.1"
73
+ "@willbooster/web-tree-sitter": "^20.0.0"
75
74
  },
76
75
  "peerDependenciesMeta": {
77
76
  "@willbooster/web-tree-sitter": {
@@ -1,4 +1,4 @@
1
1
  // @ts-check
2
2
 
3
3
  // oxlint-disable-next-line unicorn/prefer-module -- Tree-sitter loads grammar dependencies as CommonJS.
4
- module.exports = { primitiveTypeKeywords: ['bool', 'char', 'int', 'float', 'double', 'void'] };
4
+ module.exports = { primitiveTypeKeywords: ['_Bool', 'bool', 'char', 'int', 'float', 'double', 'void'] };
package/src/keywords.h CHANGED
@@ -9,6 +9,7 @@ static const char *const function_macro_keywords[] = {
9
9
  "_Alignof",
10
10
  "_Atomic",
11
11
  "_BitInt",
12
+ "_Bool",
12
13
  "_Complex",
13
14
  "_Countof",
14
15
  "_Defer",
@@ -148,6 +149,7 @@ static const char *const function_macro_group_modifiers[] = {
148
149
  static const char *const function_macro_type_keywords[] = {
149
150
  "_Atomic",
150
151
  "_BitInt",
152
+ "_Bool",
151
153
  "_Complex",
152
154
  "_Imaginary",
153
155
  "__complex__",
@@ -192,6 +194,7 @@ static const char *const function_macro_type_keywords[] = {
192
194
  "void",
193
195
  };
194
196
  static const char *const function_macro_scalar_type_keywords[] = {
197
+ "_Bool",
195
198
  "bool",
196
199
  "char",
197
200
  "char16_t",
@@ -222,6 +225,7 @@ static const char *const function_macro_scalar_type_keywords[] = {
222
225
  static const char *const function_macro_object_prefix_keywords[] = {
223
226
  "_Alignas",
224
227
  "_Atomic",
228
+ "_Bool",
225
229
  "_Complex",
226
230
  "_Imaginary",
227
231
  "_Nonnull",
Binary file
package/tree-sitter.json CHANGED
@@ -24,7 +24,7 @@
24
24
  }
25
25
  ],
26
26
  "metadata": {
27
- "version": "35.0.0",
27
+ "version": "37.0.0",
28
28
  "license": "MIT",
29
29
  "description": "C grammar for tree-sitter",
30
30
  "authors": [