summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-25 23:38:15 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-25 23:38:15 -0400
commit1949636463f53675f04e1315ad84ecc87def57cb (patch)
tree421de652d28b966616a850feab09ab80aaaebb76 /types.h
parent8e5951cefcffcd74674233637c07137c6f60ecc1 (diff)
improved struct member lookup
Diffstat (limited to 'types.h')
-rw-r--r--types.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/types.h b/types.h
index 710faf8..a3a211a 100644
--- a/types.h
+++ b/types.h
@@ -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 {