feat(parser): 启用parser和ast模块并重构解析器结构
- 在cbuild.toml中启用parser和ast依赖项 - 将AST内置类型枚举重命名为SCC_AST_BUILTIN_TYPE_*前缀格式 - 修复ast_def.h中的类型字段命名,将builtin改为type - 添加逗号操作符支持到表达式操作符枚举中 - 更新字面量表达式的lexeme字段为const char*指针和owned标志 - 重构解析器头文件结构,分离为parser.h、parser_utils.h、scc_sema.h等 - 实现新的解析器工具函数,包括预览、消费、回溯等功能 - 更新声明解析逻辑,使用新的解析器接口进行token处理 - 添加符号表语义分析功能框架 - 修复词法分析器中token移动时的空指针检查 - 统一使用scc_tree_dump_printf替代直接的scc_printf调用
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
#define __SCC_LOG_IMPL_IMPORT_SRC__
|
||||
#include <scc_core_log.h>
|
||||
|
||||
#define scc_stdout 1
|
||||
#define scc_stderr 2
|
||||
|
||||
void putchar_(char ch) { LOG_FATAL("you can't use printf.c directly"); }
|
||||
|
||||
scc_file_t scc_fopen(const char *path, scc_fmode_t mode) {
|
||||
|
||||
Reference in New Issue
Block a user