aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-05-29 11:37:32 +0200
committerlemon <lsof@mailbox.org>2023-05-29 11:37:32 +0200
commit1c04435e5d33378ffa8eca65ca1ed35f3f9f4134 (patch)
treeeab923f7dde10ba1d71d8efe025891e743009203 /parse.h
parent84824a0ed3a0cf90728078b74ca39778c51e60b9 (diff)
field access
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/parse.h b/parse.h
index dee1115..a28c301 100644
--- a/parse.h
+++ b/parse.h
@@ -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);