#ifndef CERC_TYPE_H #define CERC_TYPE_H #include #include #include "expr.h" #include "lex.h" #include "util.h" // Only 64-bit targets are supported #define PLATBITS 64 struct cer_int { int bits; int issigned; }; struct cer_float { int bits; }; enum typekind { TK_INT, TK_FLOAT, TK_BOOL, }; struct type { enum typekind kind; union { struct cer_int i; struct cer_float fp; } desc; }; extern const struct cer_int cer_int8_t, cer_uint8_t; extern const struct cer_int cer_int16_t, cer_uint16_t; extern const struct cer_int cer_int32_t, cer_uint32_t; extern const struct cer_int cer_int64_t, cer_uint64_t; extern const struct cer_int cer_int_t, cer_uint_t; extern const struct cer_float cer_float32_t; extern const struct cer_float cer_float64_t; #endif