diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-30 21:17:42 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-30 21:17:42 -0400 |
commit | 4ee46b53971e876d93fea0c0a2ba358cad51be21 (patch) | |
tree | 431d4694c62236b36a2e10fbb2ca50b3d4aff7e1 /types.h | |
parent | fdc1946407222c340609d6c993138690a508a641 (diff) |
probably got structs working (but not .)
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -88,6 +88,7 @@ typedef union Value { struct FnExpr *fn; void *arr; void *ptr; + void *struc; union Value *tuple; Slice slice; struct Type *type; @@ -272,10 +273,12 @@ typedef enum { typedef struct { Identifier name; struct Type *type; + size_t offset; /* offset during compile time */ } Field; #define TYPE_FLAG_FLEXIBLE 0x01 #define TYPE_FLAG_RESOLVED 0x02 +#define TYPE_FLAG_STRUCT_FOUND_OFFSETS 0x04 typedef struct Type { Location where; @@ -301,6 +304,7 @@ typedef struct Type { } user; struct { Field *fields; + size_t size; /* size of this struct during compile time */ } struc; }; } Type; |