summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/types.h b/types.h
index 2358f45..2ddd648 100644
--- a/types.h
+++ b/types.h
@@ -302,7 +302,14 @@ typedef struct Type {
struct Type *ptr;
struct Type *slice;
struct {
- Identifier name;
+ union {
+ struct {
+ struct Declaration *decl;
+ int index; /* index in decl */
+ };
+ Identifier ident;
+ };
+
} user;
struct {
Field *fields;
@@ -506,9 +513,6 @@ typedef struct Declaration {
Expression expr;
Value val; /* only for constant decls. */
- struct {
- IdentID *ids; /* array of IDs used in place of ident names. unfortunately needed for user defined types. this is NOT a dynamic array, but is of length arr_len(idents). */
- } c;
} Declaration;
typedef enum {