- 添加 va_list、bool、signed/unsigned 各种整数类型等内置类型 - 重新排列内置类型枚举顺序,增加 UNKNOWN 类型 - 为复合字面量、指针类型、数组类型添加初始化函数 - 添加结构体、联合体、枚举、typedef 类型的初始化函数 - 更新类型转储功能以支持新的内置类型显示 refactor(parser): 优化类型解析和声明处理逻辑 - 修改类型解析函数返回类型为通用 AST 节点 - 重构声明解析逻辑,支持变量和函数声明的不同处理路径 - 更新语法分析规则中的空格标记处理 - 简化表达式解析中的错误处理流程 fix(ast): 修复参数声明和类型转储相关问题 - 修正参数声明初始化函数中对 name 参数可为空的处理 - 修复类型转储中修饰符显示和指针类型显示问题 - 更新 AST 转储中空值检查使用正确的 null 比较
32 lines
1.4 KiB
C
32 lines
1.4 KiB
C
#ifndef __SCC_AST_BUILTIN_H__
|
|
#define __SCC_AST_BUILTIN_H__
|
|
|
|
#include "ast_def.h"
|
|
|
|
extern scc_ast_type_t scc_ast_builtin_type_va_list;
|
|
extern scc_ast_type_t scc_ast_builtin_type_void;
|
|
extern scc_ast_type_t scc_ast_builtin_type_bool;
|
|
extern scc_ast_type_t scc_ast_builtin_type_char;
|
|
extern scc_ast_type_t scc_ast_builtin_type_short;
|
|
extern scc_ast_type_t scc_ast_builtin_type_long;
|
|
extern scc_ast_type_t scc_ast_builtin_type_long_long;
|
|
extern scc_ast_type_t scc_ast_builtin_type_int;
|
|
extern scc_ast_type_t scc_ast_builtin_type_float;
|
|
extern scc_ast_type_t scc_ast_builtin_type_double;
|
|
extern scc_ast_type_t scc_ast_builtin_type_long_double;
|
|
extern scc_ast_type_t scc_ast_builtin_type_complex_float;
|
|
extern scc_ast_type_t scc_ast_builtin_type_complex_double;
|
|
extern scc_ast_type_t scc_ast_builtin_type_complex_long_double;
|
|
extern scc_ast_type_t scc_ast_builtin_type_unsigned_char;
|
|
extern scc_ast_type_t scc_ast_builtin_type_unsigned_short;
|
|
extern scc_ast_type_t scc_ast_builtin_type_unsigned_int;
|
|
extern scc_ast_type_t scc_ast_builtin_type_unsigned_long;
|
|
extern scc_ast_type_t scc_ast_builtin_type_unsigned_long_long;
|
|
extern scc_ast_type_t scc_ast_builtin_type_signed_char;
|
|
extern scc_ast_type_t scc_ast_builtin_type_signed_short;
|
|
extern scc_ast_type_t scc_ast_builtin_type_signed_int;
|
|
extern scc_ast_type_t scc_ast_builtin_type_signed_long;
|
|
extern scc_ast_type_t scc_ast_builtin_type_signed_long_long;
|
|
|
|
#endif
|