From 6f6c827172b69d379682d197232c7bb155a1ffa1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 22 Jun 2024 23:06:50 +0200 Subject: Set RHS to ā€˜iā€™ when a block is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index ab0684a..8705310 100644 --- a/src/parser.c +++ b/src/parser.c @@ -99,7 +99,7 @@ parseblk(ast_t *ast, aux_t *aux, lexemes_t toks) ast->lexemes[i] = toksidx; ast->kinds[i] = ASTBLK; ast->kids[i].lhs = AST_EMPTY; - ast->kids[i].rhs = 0; + ast->kids[i].rhs = i; if (toks.kinds[toksidx++] != LEXLBRACE) err("parser: Expected left brace"); -- cgit v1.2.3