summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-08-28 21:21:28 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-08-28 21:21:28 -0400
commite51b8fe8f43f6a1295367cd54c60c3c78b70ebb2 (patch)
tree3ef37ac9a5150fe4bf4dc39dcd321054be64fa01 /parse.c
parent4227b244b99cdfb1a1022f7816e52256bcca4bc7 (diff)
cleaned up code; work on types
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 4bd7bae..058c9aa 100644
--- a/parse.c
+++ b/parse.c
@@ -109,8 +109,8 @@ typedef struct Declaration {
Location where;
Array idents;
Type type;
- Expression expr;
unsigned short flags;
+ Expression expr;
} Declaration;
typedef enum {
@@ -326,6 +326,7 @@ static bool parse_fn_expr(Parser *p, FnExpr *f) {
if (token_is_kw(t->token, KW_LBRACE)) {
/* void function */
f->ret_type.kind = TYPE_VOID;
+ f->ret_type.flags = 0;
} else {
if (!parse_type(p, &f->ret_type)) {
return false;