|
Zen-C
|
Represents a formal type in the type system. More...
#include <ast.h>

Data Fields | ||
| TypeKind | kind | |
| The kind of type. | ||
| char * | name | |
| Name of the type (for STRUCT, GENERIC, ENUM). | ||
| struct Type * | inner | |
| Inner type (for POINTER, ARRAY). | ||
| struct Type ** | args | |
| Generic arguments (for GENERIC instantiations). | ||
| int | arg_count | |
| Count of generic arguments. | ||
| int | is_const | |
| 1 if const-qualified. | ||
| int | is_explicit_struct | |
| 1 if defined with "struct" keyword explicitly. | ||
| int | is_raw | |
| int | array_size | |
| Size for fixed-size arrays. For TYPE_BITINT, this is the bit width. | ||
| union { | ||
| int is_varargs | ||
| 1 if function type is variadic. More... | ||
| int is_restrict | ||
| 1 if pointer is restrict-qualified. More... | ||
| struct { | ||
| int has_drop | ||
| 1 if type implements Drop trait (RAII). More... | ||
| int has_iterable | ||
| 1 if type implements Iterable trait. More... | ||
| } traits | ||
| struct { | ||
| int is_opaque_alias | ||
| char * alias_defined_in_file | ||
| } alias | ||
| }; | ||
Represents a formal type in the type system.
| union { ... } Type |
| struct { ... } Type::alias |
| char* Type::alias_defined_in_file |
| int Type::arg_count |
Count of generic arguments.
| struct Type** Type::args |
Generic arguments (for GENERIC instantiations).
| int Type::array_size |
Size for fixed-size arrays. For TYPE_BITINT, this is the bit width.
| int Type::has_drop |
1 if type implements Drop trait (RAII).
| int Type::has_iterable |
1 if type implements Iterable trait.
| struct Type* Type::inner |
Inner type (for POINTER, ARRAY).
| int Type::is_const |
1 if const-qualified.
| int Type::is_explicit_struct |
1 if defined with "struct" keyword explicitly.
| int Type::is_opaque_alias |
| int Type::is_raw |
| int Type::is_restrict |
1 if pointer is restrict-qualified.
| int Type::is_varargs |
1 if function type is variadic.
| TypeKind Type::kind |
The kind of type.
| char* Type::name |
Name of the type (for STRUCT, GENERIC, ENUM).
| struct { ... } Type::traits |