Repository navigation
Use void placeholders so statement-start templates survive ASI - #78
Merged
NullVoxPopuli merged 1 commit intoAug 24, 2026
Merged
Conversation
NullVoxPopuli
approved these changes
Aug 24, 2026
NullVoxPopuli-ai-agent
force-pushed
the
void-placeholder
branch
from
August 24, 2026 23:45
513e855 to
ac15a86
Compare
A bare backtick placeholder after an unterminated expression statement continues it as a tagged template: `const y = x\n<template>` became `x`...`` and the template vanished from the tree. `void` cannot continue an expression, so automatic semicolon insertion applies exactly as it does for the real `<template>`, and being a keyword it adds no identifier reference for scope analysis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN
NullVoxPopuli-ai-agent
force-pushed
the
void-placeholder
branch
from
August 24, 2026 23:46
ac15a86 to
4a36ac2
Compare
NullVoxPopuli
approved these changes
Aug 24, 2026
Merged
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.
In a file without semicolons, a module-level template after an expression statement disappears:
The placeholder JS is
const y = x\n\...`which parses as the tagged template ``x...``, soprogram.bodyhas twoVariableDeclarations and noGlimmerTemplate. Same forsetup()\n,arr[0]\n`, etc.This PR emits
void \...`instead of a bare backtick literal for expression templates (class members keepstatic{`...`}).voidcannot continue an expression, so ASI applies exactly as it does for the real; being a keyword, it adds no identifier reference for scope analysis to trip over (unlike a tag identifier). Length budget is unchanged (void+ two backticks = 7 chars, under the 10-char` tag).Consumer-visible change:
templateInfos[].placeholder(custom-parser path) is now aUnaryExpressionrather than aTemplateLiteral, and the TS node it maps to isvoid-typed rather thanstring-typed. Both were stand-ins; flagging in case ember-eslint-parser inspects the placeholder type.Tests added for the two ASI shapes; the custom-parser tests that asserted on the placeholder type are updated.
Found while wiring glint's
rewriteModuleStandalone(typed-ember/glint#1226) onto ember-estree.🤖 Generated with Claude Code
https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN