Files
Serendipity a15cd9d56e feat: match 表达式 (P1 #8 收官)
- lexer: TOK_MATCH, TOK_MATCH_ARROW, TOK_UNDERSCORE
- parser: parse_match_stmt() desugar → let+if-else链
- 零 sema/codegen 改动
- 4个集成测试: enum/int literal/wildcard match

P1 全部完成: type alias + enum + array + impl + match
2026-06-05 14:41:52 +08:00

11 lines
198 B
Plaintext

fn main() -> i64 {
let x = 5;
match x {
1 => { print_i64(10); }
2 => { print_i64(20); }
5 => { print_i64(50); }
_ => { print_i64(99); }
}
return 0;
}