feat: for 循环 + range (for i in start..end)

- lexer: TOK_FOR, TOK_IN, TOK_DOT_DOT + 修复数字中 .. 解析
- parser: for-in-range → desugar to {let mut, while, assign}
- 零 sema/codegen 改动,复用现有机制
- 新增 2 个集成测试 (10_for_range.l, 11_for_step2.l)
- mem2reg: LLVM 22 C API 不导出,标注已知限制

基于 Codex 分析报告 §6 P0 #3。
This commit is contained in:
2026-06-05 04:42:44 +08:00
parent 72a971e5bf
commit 8144f1bfd7
8 changed files with 349 additions and 6 deletions
+8
View File
@@ -0,0 +1,8 @@
fn main() -> i64 {
let start: i64 = 10;
let end: i64 = 15;
for n in start..end {
print_i64(n);
}
return 0;
}