Rewrite: C++ → Rust, Lexer + Error system complete

全量 Rust 重写 Fig 编译器前端。

Lexer: 43 个测试,千行压力测试通过,完整 UTF-8 支持(中文标识符/字符串),运算符最长匹配打表,单行/多行注释 + 错误恢复。

Error System: Diagnostic trait + Warning/Error/Critical 三级严重度,源码上下文渲染(Unicode 波浪线、中英双语 i18n),SourcePosition/SourceRange 为 LSP 准备,Related 关联信息,thrower 宏追踪编译器源码位置。

Build: cargo + build.rs(git hash + 编译时间戳)。

删除全部 C++ 源码。
This commit is contained in:
2026-07-23 22:50:37 +08:00
parent 82c7c7178f
commit 68e6552d07
127 changed files with 2624 additions and 40689 deletions

7
Cargo.lock generated Normal file
View File

@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "fig"
version = "0.6.0"