Skip to content

Add template directives support (%{if}, %{for}) in quoted strings#276

Draft
kkozik-amplify wants to merge 1 commit intorelease/8.xfrom
template-directives-support
Draft

Add template directives support (%{if}, %{for}) in quoted strings#276
kkozik-amplify wants to merge 1 commit intorelease/8.xfrom
template-directives-support

Conversation

@kkozik-amplify
Copy link
Collaborator

@kkozik-amplify kkozik-amplify commented Mar 11, 2026

Summary

  • Adds parsing support for HCL2 template directives (%{if}, %{else}, %{endif}, %{for}, %{endfor}) within quoted strings, including strip markers (~) and nested directives
  • Grammar uses flat directive rules assembled into nested structures by the transformer to avoid LALR conflicts
  • Full round-trip support: parse, serialize, deserialize, reconstruct all handle directives correctly

Caused by #247

Test plan

🤖 Generated with Claude Code

…t_specialized.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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