Used Variables instead of Options, in SConstruct
[mcc.git] / c_btypes.h
blob714df5a3c350d85e5645991943c21e19bec1b305
1 #ifndef MCC_C_BTYPES_H
2 #define MCC_C_BTYPES_H
4 // a C type
5 // this structure can hold all the information
6 // for a basic type such as 'int', or 'const unsigned long'
7 // but for more complex types (structs, pointers), it can't.
8 enum btype_base_type {
9 BT_VOID = 0,
10 BT_CHAR,
11 BT_INT,
12 BT_FLOAT,
13 BT_DOUBLE,
14 BT_POINTER, // pointer to type in btype::node
15 BT_STRUCT, // struct OR union (btype::node points to STF_TAG node)
18 // qualifiers and type-qualifiers
19 #define TQ_SHORT (1 << 0)
20 #define TQ_LONG (1 << 1)
21 #define TQ_LONG_LONG (1 << 2)
22 #define TQ_UNSIGNED (1 << 3)
23 #define TQ_SIGNED (1 << 4)
24 #define TQ_CONST (1 << 5)
25 #define TQ_VOLATILE (1 << 6)
26 #define TQ_RESTRICT (1 << 7)
28 struct btype {
29 enum btype_base_type base_type;
30 int qualifiers; // TQ_* constants
31 struct stree *node; // stree node for type
34 #endif