summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-06 14:32:15 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-06 14:32:15 -0500
commitdea1ae517bd01e3f21db9e338264417cd6cbea51 (patch)
tree32c42d1b72512a9ab13f3241b04e58d73df605b5 /types.h
parent81840d518d8b170128e5867274c91dda0db3e4f6 (diff)
changed syntax for tuples to allow for complicated types
Diffstat (limited to 'types.h')
-rw-r--r--types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/types.h b/types.h
index 8979475..147ee44 100644
--- a/types.h
+++ b/types.h
@@ -334,6 +334,7 @@ typedef enum {
TYPE_PTR,
TYPE_SLICE,
TYPE_TYPE,
+ TYPE_PKG,
TYPE_EXPR, /* just use this expression as the type. this kind of type doesn't exist after resolving. */
TYPE_STRUCT
#define TYPE_COUNT (TYPE_STRUCT+1)
@@ -456,6 +457,7 @@ typedef enum {
EXPR_DALIGNOF,
EXPR_SLICE,
EXPR_TYPE,
+ EXPR_PKG,
/*
a value (it's useful to have this).
right now they don't work with cgen_set_tuple
@@ -641,6 +643,9 @@ typedef struct Expression {
struct {
Type type;
} del;
+ struct {
+ struct Expression *name;
+ } pkg;
IfExpr if_;
WhileExpr while_;
EachExpr *each;