Skip to content

Commit 263fdda

Browse files
Emitted parser to 0.84x tsc, span-only CST, FN=0 vs tsc's parse surface, generated per-arm destructurers (#35)
1 parent d36bed9 commit 263fdda

58 files changed

Lines changed: 5171 additions & 3720 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Generated artifacts (npm run gen) — committed for consumers, CI-gated for
2+
# staleness, collapsed in GitHub diffs. The grammar sources (*.ts at the repo
3+
# root) are the hand-written truth; everything below is derived from them.
4+
# (*.cst-types.ts / *.cst-match.ts are generated too but NOT committed — see
5+
# .gitignore; they regenerate locally and in CI before typecheck/gates.)
6+
*.tmLanguage.json linguist-generated=true
7+
*.language-configuration.json linguist-generated=true
8+
*.monarch.json linguist-generated=true
9+
*.contributes.json linguist-generated=true
10+
tree-sitter/** linguist-generated=true

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ jobs:
2323

2424
- run: npm ci
2525

26-
- name: Typecheck
27-
run: npx tsc --noEmit
28-
29-
# Regenerate every grammar's artifacts and fail if any drifts from the committed
30-
# files (someone edited a grammar but forgot to regenerate). Covers all four
31-
# grammars (sources at the repo root) + the tree-sitter packages.
32-
- name: Generate editor artifacts (must be in sync)
26+
# Regenerate every grammar's artifacts FIRST: the uncommitted ones
27+
# (*.cst-types.ts / *.cst-match.ts, gitignored) must exist before Typecheck
28+
# and the gates, which import them. Then fail if any COMMITTED artifact
29+
# drifts from the regenerated output (someone edited a grammar but forgot
30+
# to regenerate). Covers all grammars (sources at the repo root) + the
31+
# tree-sitter packages.
32+
- name: Generate editor artifacts (committed ones must be in sync)
3333
run: |
3434
npm run gen
35-
git diff --exit-code -- '*.tmLanguage.json' '*.language-configuration.json' '*.monarch.json' '*.cst-types.ts' '*.contributes.json' tree-sitter
35+
git diff --exit-code -- '*.tmLanguage.json' '*.language-configuration.json' '*.monarch.json' '*.contributes.json' tree-sitter
36+
37+
- name: Typecheck
38+
run: npx tsc --noEmit
3639

3740
# Every correctness GATE through ONE runner — sanity / agnostic / conformance /
3841
# highlighter / vue / yaml / the generative scope≡role check / the gap-ledger selftest

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ tree-sitter/*/src/grammar.json
1717
tree-sitter/*/src/node-types.json
1818
tree-sitter/*/src/tree_sitter/
1919
tree-sitter/*/*.wasm
20+
21+
# Generated CST consumer artifacts (npm run gen) — derived from the grammar, not
22+
# committed: generate locally / in CI before typecheck and gates.
23+
*.cst-types.ts
24+
*.cst-match.ts

html.cst-types.ts

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)