Skip to content

Keep the export default wrapper around a default-exported template - #82

Merged
NullVoxPopuli merged 1 commit into
NullVoxPopuli:mainfrom
NullVoxPopuli-ai-agent:export-default-wrapper
Aug 25, 2026
Merged

NullVoxPopuli merged 1 commit into
NullVoxPopuli:mainfrom
NullVoxPopuli-ai-agent:export-default-wrapper

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

Split out of #80.

toTree("export default <template>hi</template>;").program.body
// before: [GlimmerTemplate]
// after:  [ExportDefaultDeclaration { declaration: GlimmerTemplate }]

print() round-trips the same input as <template>hi</template> today, dropping the export. The declaration is now what gets spliced; the wrapper stays, and visitors see ExportDefaultDeclaration then the template beneath it.

Tests for the tree shape and the print round-trip.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN

`export default <template>...</template>` spliced the GlimmerTemplate in
place of the whole ExportDefaultDeclaration, so the tree and `print()`
both lost the `export default`. The declaration is now what gets spliced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsXgxh6vNRWMCNcAQ3g6TN
@NullVoxPopuli
NullVoxPopuli merged commit ecb3a06 into NullVoxPopuli:main Aug 25, 2026
6 checks passed
@NullVoxPopuli
NullVoxPopuli deleted the export-default-wrapper branch August 25, 2026 17:57
@github-actions github-actions Bot mentioned this pull request Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants