diff options
| author | 2023-05-29 11:37:32 +0200 | |
|---|---|---|
| committer | 2023-05-29 11:37:32 +0200 | |
| commit | 1c04435e5d33378ffa8eca65ca1ed35f3f9f4134 (patch) | |
| tree | eab923f7dde10ba1d71d8efe025891e743009203 /parse.h | |
| parent | 84824a0ed3a0cf90728078b74ca39778c51e60b9 (diff) | |
field access
Diffstat (limited to 'parse.h')
| -rw-r--r-- | parse.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -152,17 +152,17 @@ struct expr { union type ty; struct span span; union { - struct expr *sub; + struct { + struct expr *sub; + struct { + ushort off; + uchar bitsiz, bitoff; + } fld; /* EGETF */ + }; uvlong u; vlong i; double f; /* ENUMLIT */ struct bytes s; /* ESTRLIT */ struct decl *sym; /* ESYM */ struct initializer *ini; /* EINIT */ - struct { /* EGETF */ - const char *name; - uint off; - uchar bitsiz, bitoff; - } fld; - char dummy; }; }; @@ -180,6 +180,7 @@ enum evalmode { EVINTCONST, EVARITH, EVSTATICINI, + EVFOLD, }; bool eval(struct expr *, enum evalmode); |