summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-11 12:51:25 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-11 12:51:25 -0500
commit44166ec379d325982ebb3f116e56df89dc8aefb4 (patch)
tree57dea613e1a5146da57247df8c5ffbe5c783647f /types.h
parentd85514452aeb9c8d322ad2b82366ca910d96ba19 (diff)
changed the way struct names work
Diffstat (limited to 'types.h')
-rw-r--r--types.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/types.h b/types.h
index 8050c3a..8fd9af1 100644
--- a/types.h
+++ b/types.h
@@ -390,11 +390,6 @@ typedef struct FnType {
} FnType;
enum {
- STRUCT_DEF_FOUND_OFFSETS = 0x01,
- STRUCT_DEF_CGENERATED = 0x02,
-};
-
-enum {
TYPE_IS_FLEXIBLE = 0x01,
TYPE_IS_RESOLVED = 0x02,
};
@@ -430,14 +425,21 @@ typedef struct Field {
size_t offset; /* offset during compile time */
} Field;
+enum {
+ STRUCT_DEF_FOUND_OFFSETS = 0x01,
+ STRUCT_DEF_CGEN_DECLARED = 0x02,
+ STRUCT_DEF_CGEN_DEFINED = 0x04
+};
+
typedef struct StructDef {
Field *fields;
Location where;
- U16 flags;
+ U8 flags;
size_t size; /* size of this struct during compile time */
size_t align;
+ Identifier name;
struct {
- Identifier name;
+ /* if name is NULL, use this */
IdentID id;
} c;
struct {