Repository navigation
grammar(ts): vendor fork 2e6d064 — unique as a name; ASI before in2 / in$x - #17
Merged
Merged
Conversation
… 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(...)`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.