aboutsummaryrefslogtreecommitdiff
path: root/AGENTS/EXTENDING.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-16 10:09:47 +0000
committer_ov4 <ov4@ov4.org>2026-10-16 10:09:47 +0000
commite2c65706e61be09ddb7eeb28cd1957acd4317bcf (patch)
tree15447a03d67d395a722c5be3f0b05bc9f197197a /AGENTS/EXTENDING.md
parent45c9d37eb27d204a6202b33cb37e890af0171357 (diff)
feat(constants): implement literal constants with lexical scope
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/EXTENDING.md')
-rw-r--r--AGENTS/EXTENDING.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/AGENTS/EXTENDING.md b/AGENTS/EXTENDING.md
index d03c088..5e104c8 100644
--- a/AGENTS/EXTENDING.md
+++ b/AGENTS/EXTENDING.md
@@ -9,7 +9,8 @@ unique_ptr children, move ctor, raw-ptr getters) → `ParseXxx` in
the matching `Parser*.cc` file + branch in `ParseStatementImpl` (block statements parse their body with
`ParseBlock({terminator tokens})`; control-flow parsers live in `ParserControlFlow.cc`; comma-separated expression lists use
`ParseExprList(close, allowEmpty)`; add the new statement's leading keyword to
-`syncToStatementStart`) → `dynamic_cast` branch in `CodeGen::emitStmt`. Guard every
+`syncToStatementStart`) → `dynamic_cast` branch in `CodeGen::emitStmt`. Emit statement bodies through `emitScopedBlock`
+so constants cannot escape their lexical block. Guard every
fall-through branch in control-flow codegen with
`if (!Builder->GetInsertBlock()->hasTerminator())` — a RETURN in the body may have
already terminated the block.