X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=type_t.h;h=64d5c5ca2fb89f7fbf6af5966141441abc5398e4;hb=e8b00fcb80ff3fdcfab757444e94663f1d56c743;hp=9d2b61e9483e8b28c1072df9e2a7844beab3f7b7;hpb=daab1c4b9ec9146053f6d4f16ca2b92222104ddc;p=cparser diff --git a/type_t.h b/type_t.h index 9d2b61e..64d5c5c 100644 --- a/type_t.h +++ b/type_t.h @@ -3,7 +3,8 @@ #include "type.h" #include "symbol.h" -#include "lexer_t.h" +#include "token_t.h" +#include "ast_t.h" #include "adt/obst.h" struct obstack *type_obst; @@ -15,7 +16,8 @@ typedef enum { TYPE_COMPOUND_UNION, TYPE_ENUM, TYPE_METHOD, - TYPE_POINTER + TYPE_POINTER, + TYPE_BUILTIN } type_type_t; typedef enum { @@ -65,6 +67,18 @@ struct atomic_type_t { atomic_type_type_t atype; }; +struct builtin_type_t { + type_t type; + symbol_t *symbol; +}; + +struct enum_type_t { + type_t type; + symbol_t *symbol; + /* TODO: list of enum members */ + source_position_t source_position; +}; + struct pointer_type_t { type_t type; type_t *points_to; @@ -72,6 +86,7 @@ struct pointer_type_t { struct method_parameter_type_t { type_t *type; + symbol_t *symbol; method_parameter_type_t *next; }; @@ -79,26 +94,14 @@ struct method_type_t { type_t type; type_t *result_type; method_parameter_type_t *parameter_types; - const char *abi_style; -}; - -struct compound_entry_t { - type_t *type; - symbol_t *symbol; - compound_entry_t *next; - source_position_t source_position; + int variadic; + int unspecified_parameters; }; struct compound_type_t { type_t type; - compound_entry_t *entries; - symbol_t *symbol; - source_position_t source_position; -}; - -struct enum_type_t { - /* todo */ symbol_t *symbol; + context_t context; source_position_t source_position; };