feat(ast): 添加AST定义和dump工具头文件

新增libs/ast模块的基础定义文件,包括:
- AST节点类型枚举定义,涵盖声明、语句、表达式、类型等各类节点
- AST操作符枚举,定义所有二元、一元、逻辑、算术等操作符
- AST节点结构体定义,包含表达式、语句、声明、类型等具体实现
- AST dump工具接口,支持树形结构输出和颜色显示
- 语义分析回调函数类型定义,为后续语义分析提供基础
This commit is contained in:
zzy
2026-01-28 15:44:59 +08:00
parent e1cd8c5206
commit 79ee7a657a
13 changed files with 4181 additions and 0 deletions

9
libs/ast/cbuild.toml Normal file
View File

@@ -0,0 +1,9 @@
[package]
name = "scc_ast"
version = "0.1.0"
authors = []
description = ""
# dependencies = []
# features = {}
# default_features = []