feat(ast): 添加内置类型定义和AST节点初始化函数

添加了完整的内置类型支持,包括整数、浮点数、字符、布尔等基本类型,
以及它们的有符号/无符号变体。同时添加了大量的AST节点初始化函数,
简化了AST节点的创建过程。

BREAKING CHANGE: 重构了AST表达式和声明结构,移除了冗余字段,
统一了命名规范,并修改了函数调用和成员访问的表示方式。
This commit is contained in:
zzy
2026-03-10 13:56:32 +08:00
parent 80714fe7e5
commit 2e331ee016
17 changed files with 981 additions and 581 deletions

View File

@@ -72,9 +72,9 @@ int scc_fprintf(scc_file_t file, const char *format, ...) {
int scc_vfprintf(scc_file_t file, const char *format, va_list args) {
char buf[4096] = {0};
int size = vsnprintf_(buf, sizeof(buf), format, args);
if (file == (scc_file_t)scc_stdout) {
if (file == scc_stdout) {
scc_pal_write(buf, size);
} else if (file == (scc_file_t)scc_stderr) {
} else if (file == scc_stderr) {
scc_pal_ewrite(buf, size);
} else {
scc_pal_fwrite(file, buf, size);