refactor(lexer): 重构词法分析器头文件结构并优化缓冲区管理
移除了旧的lexer_stream.c实现,引入新的环形缓冲区机制来替代原有的 动态数组缓冲区。更新了词法分析器的核心数据结构,修改了token获取 相关函数的实现以支持新的缓冲区管理方式。 BREAKING CHANGE: 移除了scc_lexer_stream_t相关的API,替换为基于 环形缓冲区的新接口scc_lexer_to_ring和相关函数。 feat(lexer_token): 添加词法分析结果内存泄漏警告注释 docs: 移除预处理器模块的测试文件和相关配置
This commit is contained in:
@@ -144,6 +144,10 @@ typedef enum scc_tok_subtype {
|
||||
scc_tok_subtype_t scc_get_tok_subtype(scc_tok_type_t type);
|
||||
const char *scc_get_tok_name(scc_tok_type_t type);
|
||||
|
||||
/**
|
||||
* @brief 词法分析结果
|
||||
* @warning 需要手动释放lexeme否则会出现内存泄漏
|
||||
*/
|
||||
typedef struct scc_lexer_token {
|
||||
scc_tok_type_t type;
|
||||
scc_cstring_t lexeme;
|
||||
|
||||
Reference in New Issue
Block a user