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
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user