stage1 完成07,08测试

This commit is contained in:
zzy
2026-07-06 10:44:01 +08:00
parent 5dadf6d6ee
commit 777b6b42d1
7 changed files with 93 additions and 8 deletions

View File

@@ -656,7 +656,7 @@ static void parse_expr_stmt(spl_comp_t *ctx) {
if (is_assign)
ctx->addr_of_mode = 0;
if (!is_assign && expr.type)
if (!is_assign && expr.type && expr.type->kind == TYPE_BASIC && expr.type->basic_type != SPL_VOID)
spl_emit(ctx, SPL_DROP, SPL_VOID, 0);
if (peek(ctx)->type == TOK_SEMICOLON)
advance(ctx);