diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-22 23:06:50 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-22 23:06:50 +0200 |
commit | 6f6c827172b69d379682d197232c7bb155a1ffa1 (patch) | |
tree | 781387d7bd14a28d7df34767e2eeaf7eca9dfe0f | |
parent | 53983812bade3c0412d900ef2cac01e65c860d0a (diff) |
Set RHS to āiā when a block is empty
-rw-r--r-- | src/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |