selfhost: fix pointer field access, algebraic enums, string literal escaping

- hir_lower: use per-function scope instead of global scope for params
  fixes p->error emission for pointer parameters
- parser: assign variant4..variant7 in enum decls (was only 0..3)
- c_backend: escape quotes, backslash, newline, tab, cr in string literals
- runtime: bux_write_file now writes raw bytes (was un-escaping sequences)
- c_backend: emit algebraic enums as tagged unions (tag enum + data union + struct)
- hir_lower: add hBreak/hContinue lowering
- sema: skip empty variant names when collecting enum globals
This commit is contained in:
2026-06-06 23:54:09 +03:00
parent 3ae8c60ebb
commit 0bdef58182
6 changed files with 370 additions and 65 deletions
+2
View File
@@ -129,6 +129,8 @@ struct HirConst {
struct HirEnum {
name: String;
variantCount: int;
variants: *HirEnumVariant;
}
struct HirModule {