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:
@@ -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 '}'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user