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:
2026-07-16 16:19:43 +03:00
parent 2cbbccc508
commit f619316470
18 changed files with 786 additions and 110 deletions
+6 -3
View File
@@ -16,10 +16,13 @@ passed=0
failed=0
normalize() {
# Replace absolute path prefix with FILE, drop trailing blank lines
# Replace absolute paths with FILE (location markers and "in <path>" lines).
# Drop trailing blank lines.
sed -E \
-e "s|$DIR/[^:]+:|FILE:|g" \
-e "s|$ROOT/[^:]+:|FILE:|g" \
-e "s|$DIR/[^:[:space:]]+:|FILE:|g" \
-e "s|$ROOT/[^:[:space:]]+:|FILE:|g" \
-e "s|$DIR/[^:[:space:]]+|FILE|g" \
-e "s|$ROOT/[^:[:space:]]+|FILE|g" \
-e "s|//+|/|g" \
| sed -e :a -e '/^\n*$/{$d;N;ba' -e '}'
}