feat: full match expressions in bootstrap and selfhost
Lower match to if-else for literals, ranges, enum tags, and wildcards. Fix bootstrap literal arms that always matched; port real arm AST/parser and Lcx_LowerMatch to selfhost with last-expression return. Expand pattern_matching example and add parse/use-after-move/double-mut golden diagnostics. Selfhost-loop remains binary-identical.
This commit is contained in:
@@ -401,7 +401,8 @@ proc emitExpr(be: var CBackend, node: HirNode): string =
|
||||
return "0"
|
||||
|
||||
of hMatch:
|
||||
return "0" # TODO: match expression lowering
|
||||
# Match should be desugared in hir_lower to if-else. Fallback: 0.
|
||||
return "0"
|
||||
|
||||
else:
|
||||
return "0"
|
||||
|
||||
Reference in New Issue
Block a user