What's still missing for full self-hosting?
Three things:
1. Multi-digit emit_num -- our emit_digit only handles single digits. We need a recursive or loop-based version that prints arbitrary numbers as decimal. This is the emit_num from Problem 30, rewritten in our language.
2. Stdin reading -- the self-hosted compiler needs to read source code from stdin into memory. In WAT, this would be an imported function: (import "env" "read_stdin" (func $read_stdin (result i32))) that fills a memory buffer.
3. The rest of the parser -- c_factor, c_term, c_expression, c_stmt, all the keyword comparisons using streq_mem. Each is a direct translation from Zig to our language. The structure is identical; only the syntax changes.
None of these require new language features. Everything the compiler does -- character access, string comparison, output buffering, recursive descent parsing -- is expressible with what we already have: integers, memory read/write, if/else, while, and functions.
The language is big enough. The snake can reach its tail.