feat(ast): 添加内置类型定义和AST节点初始化函数
添加了完整的内置类型支持,包括整数、浮点数、字符、布尔等基本类型, 以及它们的有符号/无符号变体。同时添加了大量的AST节点初始化函数, 简化了AST节点的创建过程。 BREAKING CHANGE: 重构了AST表达式和声明结构,移除了冗余字段, 统一了命名规范,并修改了函数调用和成员访问的表示方式。
This commit is contained in:
30
libs/ast/include/ast_builtin.h
Normal file
30
libs/ast/include/ast_builtin.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef __SCC_AST_BUILTIN_H__
|
||||
#define __SCC_AST_BUILTIN_H__
|
||||
|
||||
#include "ast_def.h"
|
||||
|
||||
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_char;
|
||||
extern scc_ast_type_t scc_ast_builtin_type_void;
|
||||
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_short;
|
||||
extern scc_ast_type_t scc_ast_builtin_type_bool;
|
||||
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_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_unsigned_short;
|
||||
extern scc_ast_type_t scc_ast_builtin_type_unsigned_char;
|
||||
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;
|
||||
extern scc_ast_type_t scc_ast_builtin_type_signed_short;
|
||||
extern scc_ast_type_t scc_ast_builtin_type_signed_char;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user