Repository navigation
test(ts-differential): pin constructs the SegaraRai fork regresses - #14
Merged
Merged
Conversation
Reserved words as export aliases and typeof import("x").member parse on
the vendored grammar but fail on SegaraRai/tree-sitter-typescript@82b3609.
They were only covered by chance inside the Effect, Zod and VS Code corpora;
as strict fixtures, any grammar bump or fork that regresses them fails the job.
Review found the fork breaks a reserved word after typeof in a type (typeof ns.default), not typeof import() itself, and reserved words in import and re-export specifiers too. Rename and widen the fixtures, and add tsx twins so the tsx grammar is pinned as well.
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.
Adds four strict (non-gap) fixtures to
__tests__/fixtures/ts-syntax/, one .ts and one .tsx copy of each of these:reserved-word-alias: reserved words as module names in imports, local exports, re-exports andexport * as. Examples:import { null as n },export { a as delete },export { null as x } from,export * as delete from.typeof-reserved-member: a reserved word as the member aftertypeofin a type, as intypeof import("./mod").default,typeof ns.default,typeof ns.b.deleteandtypeof ns.null.Verified:
--only localgives 29 files and 24 agree-ok. tsc accepts all four new files, and the 5 known gaps are unchanged. Exit 0, no baseline change.Before this, these constructs were covered only by chance, in 7 Effect/Zod files and 6 VS Code files. Round 1 of /dual-review found the first version pinned the wrong rule (
typeof import()instead of a reserved member aftertypeof) and covered .ts only, so this version fixes both.