From 96ef1857bac446f4e065e7c10530213e361d726a Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 7 Aug 2022 22:36:57 +0200 Subject: add tagged unions --- bootstrap/all.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bootstrap/all.h') diff --git a/bootstrap/all.h b/bootstrap/all.h index fb6bfe6..6e63058 100644 --- a/bootstrap/all.h +++ b/bootstrap/all.h @@ -180,6 +180,7 @@ struct type { } enu; struct { const char *name; + const struct type *enumty; slice_t(struct aggfield { size_t off; const char *name; @@ -304,6 +305,7 @@ enum exprtype { Emcall, Eslice, Elen, + Eeuini, }; struct blockstmt { @@ -365,6 +367,11 @@ struct expr { struct { struct expr *lhs, *start, *end; } slice; + struct { + const char *fnam; + i64 tag; + struct expr *ini; + } euini; }; }; -- cgit v1.2.3