Commit 49a0f51
committed
feat(poet): add Switch statement, remove Func.Body field
Add Switch statement AST node:
- Switch: switch statement with optional init and expression
- Case: case clause with values (empty for default)
Breaking change to Func struct:
- Remove Body field to force use of Stmts
- Update all usages in generator.go to use Stmts with RawStmt
This enforces consistent use of the structured statement API
instead of allowing raw body strings as an escape hatch.1 parent e825282 commit 49a0f51
3 files changed
+95
-54
lines changed
0 commit comments