Repository navigation
Sort content-tag results into source order before building placeholders - #77
Merged
NullVoxPopuli merged 1 commit intoAug 24, 2026
Conversation
content-tag reports a class's own template before a template that sits earlier in its heritage clause, so `toPlaceholderJS`'s forward walk produced misaligned placeholder JS and the whole file failed to parse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN
NullVoxPopuli
approved these changes
Aug 24, 2026
Merged
NullVoxPopuli-ai-agent
added a commit
to NullVoxPopuli-ai-agent/glint
that referenced
this pull request
Aug 24, 2026
ember-estree (content-tag + oxc-parser) gives a real ESTree for the file. Walking its outer tree, with an ancestor stack, before templates are spliced in reproduces `templateThisBinding` and `collectImportedBindings` directly, so the hand-written tokenizer goes. Known divergence: oxc yields an empty program on an unrecoverable script syntax error, where TypeScript's parser keeps going. Such a file is emitted without import bindings or placement (bare identifiers still resolve lexically); the checker reports the syntax error either way. Two parity cases depend on ember-estree fixes (NullVoxPopuli/ember-estree#77 and typed-ember#78) and are marked `test.fails` until those ship. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN
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.
content-tag reports a class's own template before a template that sits earlier in its heritage clause:
parse()returns[class-member @ 60, expression @ 30].toPlaceholderJSwalks the source forward with a cursor, so the second result slices an empty string and the placeholder JS is misaligned; oxc then fails on the whole file andprogram.bodycomes back empty.Sorting the results by start offset fixes it. Test added.
Found while wiring glint's
rewriteModuleStandalone(typed-ember/glint#1226) onto ember-estree; glint's own preprocess had the same bug.🤖 Generated with Claude Code
https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN