feat(ast): 重构AST转储功能并添加tree_dump依赖
- 添加tree_dump库作为依赖项到ast模块 - 将ast_dump.h中的转储上下文结构替换为tree_dump.h中的统一实现 - 更新scc_ast_block_item_vec_t类型定义,支持stmt或decl的泛型指针 - 移除ast_dump.c中重复的缩进和上下文管理代码,使用tree_dump提供的功能 - 修改dump函数参数类型从scc_ast_dump_ctx_t为scc_tree_dump_ctx_t - 在libs目录下新增tree_dump库,包含完整的树形结构转储功能
This commit is contained in:
10
libs/tree_dump/tests/test_.c
Normal file
10
libs/tree_dump/tests/test_.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void test_example() {
|
||||
printf("Test passed!\n");
|
||||
}
|
||||
|
||||
int main() {
|
||||
test_example();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user