summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/types.h b/types.h
index 1c5aaa4..59f1b4e 100644
--- a/types.h
+++ b/types.h
@@ -382,6 +382,14 @@ typedef struct {
struct Expression *expr;
} CastExpr;
+typedef struct {
+ Type type;
+ struct Expression *n; /* e.g. for new(int, 5) */
+ struct {
+ IdentID id;
+ } c;
+} NewExpr;
+
#define EXPR_FLAG_FOUND_TYPE 0x01
typedef struct Expression {
@@ -408,9 +416,7 @@ typedef struct Expression {
CallExpr call;
DirectExpr direct;
Identifier ident;
- struct {
- Type type;
- } new;
+ NewExpr new;
struct {
Type type;
} del;