feat(ast): 添加AST定义和dump工具头文件
新增libs/ast模块的基础定义文件,包括: - AST节点类型枚举定义,涵盖声明、语句、表达式、类型等各类节点 - AST操作符枚举,定义所有二元、一元、逻辑、算术等操作符 - AST节点结构体定义,包含表达式、语句、声明、类型等具体实现 - AST dump工具接口,支持树形结构输出和颜色显示 - 语义分析回调函数类型定义,为后续语义分析提供基础
This commit is contained in:
10
libs/ast/tests/test_main.c
Normal file
10
libs/ast/tests/test_main.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