d5a94d45cb
- lexer: 4 个复合赋值 Token (解析时优先于单字符) - parser: desugar x+=expr → x=x+expr(零 sema/codegen 改动) - 新增集成测试 09_compound_assign.l (15 12 24 6) - CHANGELOG 新增 v0.2.0 条目
13 lines
211 B
Common Lisp
13 lines
211 B
Common Lisp
fn main() -> i64 {
|
|
let mut x: i64 = 10;
|
|
x += 5;
|
|
print_i64(x); // 15
|
|
x -= 3;
|
|
print_i64(x); // 12
|
|
x *= 2;
|
|
print_i64(x); // 24
|
|
x /= 4;
|
|
print_i64(x); // 6
|
|
return 0;
|
|
}
|