Skip to content

grammar(ts): vendor fork 2e6d064 — unique as a name; ASI before in2 / in$x - #17

Merged
inth3shadows merged 5 commits into
mainfrom
grammar/fork-2e6d064
Nov 7, 2026
Merged

inth3shadows merged 5 commits into
mainfrom
grammar/fork-2e6d064

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

Vendors inth3shadows/tree-sitter-typescript@2e6d064 (fork PRs #9, #10). Differential 5 -> 3 (vscode 2 -> 0), new 0, worse 0. Fork probes vs tsc and em.34: unique 14 gains / 0 regressions; in-ASI 22 gains / 0 regressions. Shapes test 12/12. Full suite: 1 failed (busiest-symbol, pre-existing) | 11098 passed.

… in$x

Two fork fixes since #16, each gated by the fork's differential:

- `unique symbol` is one token (whitespace and comments allowed between
  the words), so `unique` alone is always a name: `i < unique.length`,
  `let x: unique`, `implements unique`, `[unique: T]`. VS Code's two
  remaining files now parse. Node by node, 51 more corpus files change
  only in the anonymous tokens under `unique symbol`.
- ASI before a line starting with `in2` / `in$x` (upstream colbymchenry#373) and
  before members named `in` (`in?:`, `in<T>()`, `in!:`); `a\n in(b)`
  stays `a in (b)` instead of a call to `in`.

Differential: 201 -> 3 (effect 3), new 0, worse 0. The shapes test pins
both, including that no call to `in` is recorded (it caught a stale
kernel before the rebuild).
Fork PR inth3shadows/tree-sitter-typescript#21:
- S1 `in(): T {}` after a block-bodied arrow field; S2 `for (var k\n in!o)` /
  `in<T>x` stay for-in (member-`in` ASI now needs the new never-produced
  `_member_end_marker`, valid only where a class/object-type member ends)
- S3 `unique<NBSP>symbol` (extras whitespace); S4 `unique // the symbol` stays a name

Docs: commit + hashes; S6 (no `let x: unique`), S9 limits listed, S10 unverifiable
counts removed; table growth noted (states +18%, wasm +15%, parse speed unchanged).
Fixtures for S1-S4 (.ts, + .tsx where valid). Differential re-baselined: divergent
set unchanged (3 + 5 gap), local 56. Main (PR #18 runtime fix) merged in.

Kernel built: shapes/member-asi/variance/kernel parity/hang 154 passed; full suite
11104 passed, 1 failed (busiest-symbol, pre-existing: fails on em.36's index too).
…-drop)

Fork PR inth3shadows/tree-sitter-typescript#22:
- R1: `class K { a = x\n in(b) ? 1 : 2 }` no longer drops `in(b)` (was `x ? 1 : 2`)
- R2: strings/comments inside `in(...)` and comments after `)` are skipped
- R3: U+2028/U+2029 end a line comment inside `unique // ... symbol`
- O2: `in () {}` between members

Here: O1/O4/O5 known-limit wording; O3 drop `unique[]` from the shapes test and
unique-identifier fixtures (tsc reads it as the operator); O6 for-var-in-newline.tsx;
fixtures for R1/R2/R3/O2 (.ts + .tsx). Doc hashes -> 9ce21f8; corpus 133/133.

Kernel built: shapes/member-asi/variance/kernel parity/hang 154 passed; differential
exit 0, divergent set unchanged, local 65. Full suite 11104 passed, 1 failed
(busiest-symbol, pre-existing).
… F4); doc limits

R1 was silent (no ERROR), so the differential could not catch it coming back: the
shapes test now asserts both ternary conditions are `in` binary expressions (fails on
the 9582ff6 wasm, 2/2; passes on 9ce21f8). Known limits: `in?:` after an initializer
(tsc rejects), bare `in(...)` after an arrow field, `in : T`, regex literals in `in(...)`.
@inth3shadows
inth3shadows merged commit c686b1a into main Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant