compiler 模块注释完善:Doxygen 风格(Lexer/Parser/Linker/Typecheck/Project/MachineConfig/TypeInfo/Codec/Codegen/Stb/main 共 21 个文件)
This commit is contained in:
+14
-12
@@ -37,9 +37,11 @@
|
||||
namespace compiler {
|
||||
namespace {
|
||||
|
||||
// 关键字表:小写键 → Tok。
|
||||
// 与 Doc/compiler/词法.md 的冻结表一致(12.5 修订补入 then/do);
|
||||
// 数值即 token 类型,只追加不删改。
|
||||
/**
|
||||
* @brief 关键字表:小写键 → Tok。
|
||||
* @details 与 Doc/compiler/词法.md 的冻结表一致(12.5 修订补入
|
||||
* then/do);数值即 token 类型,只追加不删改。
|
||||
*/
|
||||
const struct {
|
||||
const char* key;
|
||||
Tok tok;
|
||||
@@ -433,15 +435,15 @@ namespace {
|
||||
}
|
||||
|
||||
// ---- 状态 ----
|
||||
const std::string& src_; // 源文本(外部所有,不拷贝)
|
||||
const std::string& sf_; // 源文件名(报错用)
|
||||
std::vector<Token>* out_; // token 流输出
|
||||
std::string* err_; // 错误输出(可空)
|
||||
size_t pos_; // 当前字符下标
|
||||
uint32_t line_; // 当前行(1 起)
|
||||
uint32_t col_; // 当前列(1 起)
|
||||
uint32_t tok_line_ = 1; // 本 token 起始行(push 时用)
|
||||
uint32_t tok_col_ = 1; // 本 token 起始列(push 时用)
|
||||
const std::string& src_; ///< 源文本(外部所有,不拷贝)
|
||||
const std::string& sf_; ///< 源文件名(报错用)
|
||||
std::vector<Token>* out_; ///< token 流输出
|
||||
std::string* err_; ///< 错误输出(可空)
|
||||
size_t pos_; ///< 当前字符下标
|
||||
uint32_t line_; ///< 当前行(1 起)
|
||||
uint32_t col_; ///< 当前列(1 起)
|
||||
uint32_t tok_line_ = 1; ///< 本 token 起始行(push 时用)
|
||||
uint32_t tok_col_ = 1; ///< 本 token 起始列(push 时用)
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user