The Compiler, in Its Own Language
self-c-block

c_block:

fn c_block() i64 {
    if (cur() == '{') { src_pos += 1; skip(); }
    var last_had_value: i64 = 0;
    while (cur() != '}') {
        if (cur() == 0) { return 0; }
        if (last_had_value == 1) { emit_s("  drop\n"); }
        last_had_value = c_stmt();
    }
    if (last_had_value == 0) { emit_s("  i64.const 0\n"); }
    if (cur() == '}') { src_pos += 1; skip(); }
    return 0;
}