diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-25 23:38:15 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-25 23:38:15 -0400 |
commit | 1949636463f53675f04e1315ad84ecc87def57cb (patch) | |
tree | 421de652d28b966616a850feab09ab80aaaebb76 /types.h | |
parent | 8e5951cefcffcd74674233637c07137c6f60ecc1 (diff) |
improved struct member lookup
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -522,7 +522,12 @@ typedef struct StructDef { Location where; U8 flags; - Block scope; /* parameters and constants live here. statements aren't used after resolving (but are kept around because why not) */ + /* + use this instead of fields when looking up a field, because it will include "use"d things. + this only consists of statements which are declarations after typing (and not #ifs, + for example) + */ + Block body; union { HashTable instances; struct { @@ -888,6 +893,7 @@ typedef struct Declaration { DeclFlags flags; union { Expression expr; + Field *field; /* pointer to the field which the first identifier in this decl refers to */ struct { union { struct { |