Skip to content

Fix uppercase source discovery and parse TSX with its own grammar - #17

Merged
script3r merged 1 commit into
mainfrom
codex/fix-language-discovery
Sep 5, 2026
Merged

Fix uppercase source discovery and parse TSX with its own grammar#17
script3r merged 1 commit into
mainfrom
codex/fix-language-discovery

Conversation

@script3r

@script3r script3r commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Directory scans silently skipped uppercase source extensions even though language_from_path accepted them. .tsx files were parsed as ordinary TypeScript, producing syntax errors around JSX.

Use the extension resolver as the single discovery filter, select the dedicated TSX grammar via Language::Tsx, and share TypeScript patterns/constants between both grammars. Preserve ordinary TypeScript angle-bracket assertions and the conventional distinction between .c and .C. Run OpenSSL C fixtures in C-only builds; those tests were incorrectly gated on both C and C++.

Validation: extension, directory-discovery, TSX parse-tree, CLI, and TypeScript regression tests; existing fixture suites; all/minimal/C-only/TypeScript-only tests; all-target Clippy with warnings denied under all and minimal features; formatting; Rust 1.88 all-target/all-feature compilation. All pattern and fixture files are unchanged.

Part 4 of the review series, independently based on main. Related: #14, #15, #16. Library clients with exhaustive matches on Language will need to handle the new Tsx variant.

@script3r
script3r merged commit c909258 into main Sep 5, 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