@willbooster/tree-sitter-cpp 1.2.0 → 1.2.2

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
@@ -12,7 +12,8 @@ C++ grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forke
12
12
  [tree-sitter/tree-sitter-cpp](https://github.com/tree-sitter/tree-sitter-cpp). We are grateful
13
13
  to its authors and contributors. This is not an official release of that project.
14
14
 
15
- This fork fixes parsing bugs and raises conformance with the ISO C++ standard ([working draft](https://eel.is/c++draft/)).
15
+ This fork fixes parsing bugs and raises conformance with the ISO C++ standard
16
+ ([working draft](https://eel.is/c++draft/)).
16
17
 
17
18
  ## Usage
18
19
 
@@ -97,17 +98,23 @@ cargo test --locked
97
98
  reparses it, undoes the edits, and reparses again. `TREE_SITTER_SEED`, `TREE_SITTER_ITERATIONS`, and
98
99
  `TREE_SITTER_EDITS` run other or more edits;
99
100
  - a check that the real-world C++ files in `examples/`, the checked-in ones and those of the cloned repositories,
100
- fail to parse exactly as listed in `script/known-failures.txt`. The first run clones the repositories. The example repositories are pinned to commits in
101
- `script/parse-examples`. After a grammar change or a moved pin alters that list, `script/parse-examples` rewrites
102
- it; review its diff before committing;
103
- - a performance check (`test/unit/performance.test.ts`) that recovering from an error on each of 10,000 lines takes
104
- linear time, since consumers parse files while they are being edited. It loads the Wasm build through
101
+ fail to parse exactly as listed in `script/known-failures.txt`. The first run clones the repositories. The example
102
+ repositories are pinned to commits in `script/parse-examples`. After a grammar change or a moved pin alters that
103
+ list, `script/parse-examples` rewrites it; review its diff before committing;
104
+ - a performance check (`test/unit/performance.test.ts`) that recovering from an error on each line takes linear
105
+ time, since consumers parse files while they are being edited. It loads the Wasm build through
105
106
  @willbooster/web-tree-sitter, which `bun run build/ci` rebuilds after regenerating the parser;
107
+ - a check (`test/unit/expressionKeywordParameter.test.ts`) that every keyword that can start an expression but not a
108
+ parameter is expected in the parameters of the function declarators that compete with a direct initialization, so
109
+ that `long(n)(sizeof(b));` stays an initialization;
110
+ - a check (`test/unit/runtimeVersion.test.ts`) that `@willbooster/web-tree-sitter` in `package.json` and
111
+ `willbooster-tree-sitter` in `Cargo.lock` are the same version, since the Wasm tests run on the former and the Rust
112
+ tests and the fuzzer on the latter;
106
113
  - checks that the Wasm build parses in Chromium (`test/unit/browser/`) and in Cloudflare Workers with and without
107
114
  Node.js compatibility (`test/unit/workers.test.ts`). Run `bun run test/ci-setup` once to install Chromium.
108
115
 
109
- CI also runs these tests on Linux arm64 and macOS, where the parser and scanner are compiled natively against each platform's C library, and fuzzes the parser with libFuzzer and sanitizers
110
- (`.github/workflows/robustness.yml`).
116
+ CI also runs these tests on Linux arm64 and macOS, where the parser and scanner are compiled natively against each
117
+ platform's C library, and fuzzes the parser with libFuzzer and sanitizers (`.github/workflows/robustness.yml`).
111
118
 
112
119
  ### References
113
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-cpp",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "C++ grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -27,7 +27,7 @@
27
27
  "lint": "bun wb lint",
28
28
  "lint-fix": "bun wb lint --fix",
29
29
  "prepare": "(bun lefthook install || true) && (test ! -f .lefthook/normalize-bun-lockfile.sh || bash .lefthook/normalize-bun-lockfile.sh)",
30
- "release": "node script/release.mjs",
30
+ "release": "wb release",
31
31
  "prestart": "bun run build-wasm",
32
32
  "start": "tree-sitter playground",
33
33
  "test": "bun wb test",
@@ -38,15 +38,14 @@
38
38
  "verify-full": "bun wb verify --full"
39
39
  },
40
40
  "devDependencies": {
41
- "@semantic-release/exec": "7.1.0",
42
41
  "@tsconfig/bun": "1.0.11",
43
42
  "@types/bun": "1.4.2",
44
43
  "@vitest/browser-playwright": "5.0.1",
45
44
  "@willbooster/oxfmt-config": "1.2.2",
46
45
  "@willbooster/oxlint-config": "1.4.8",
47
- "@willbooster/tree-sitter-c": "1.1.3",
48
- "@willbooster/wb": "22.11.5",
49
- "@willbooster/web-tree-sitter": "1.0.7",
46
+ "@willbooster/tree-sitter-c": "1.1.4",
47
+ "@willbooster/wb": "22.13.1",
48
+ "@willbooster/web-tree-sitter": "1.0.8",
50
49
  "conventional-changelog-conventionalcommits": "10.4.0",
51
50
  "lefthook": "2.1.14",
52
51
  "oxfmt": "0.70.0",
@@ -795,6 +795,10 @@
795
795
  {
796
796
  "type": "preproc_defined",
797
797
  "named": true
798
+ },
799
+ {
800
+ "type": "type_descriptor",
801
+ "named": true
798
802
  }
799
803
  ]
800
804
  }
Binary file
package/tree-sitter.json CHANGED
@@ -24,7 +24,7 @@
24
24
  }
25
25
  ],
26
26
  "metadata": {
27
- "version": "1.2.0",
27
+ "version": "1.2.2",
28
28
  "license": "MIT",
29
29
  "description": "C++ grammar for tree-sitter",
30
30
  "authors": [