aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/parse.c')
-rw-r--r--bootstrap/parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index 4b56c2b..371289f 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -2569,6 +2569,7 @@ parsestmt(stmt_yielder_t yield, void *yarg, struct parser *P) {
assert(block != NULL && "defer outside block");
defer->age = deferage++;
defer->ex = ex;
+ defer->blockid = P->curblock->id;
defer->next = block->defers;
block->defers = defer;
st.t = Sblock;
@@ -2617,10 +2618,12 @@ parseblock0(struct parser *P) {
vec_t(struct stmt) stmts = {0};
struct blockstmt block = {0};
int tokt;
+ static int id;
block.env.parent = P->curenv;
pushenv(P, &block.env);
block.defers = P->curblock ? P->curblock->defers : NULL;
+ block.id = id++;
WITH_TMPCHANGE(struct blockstmt *, P->curblock, &block) {
while ((tokt = lexpeek(P).t) != '}' && tokt != TKkw_case && tokt != ')') {
if (lexmatch(P, NULL, ';'))