aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <ginger.bill.22@gmail.com>2016-08-03 22:27:24 +0100
committergingerBill <ginger.bill.22@gmail.com>2016-08-03 22:27:36 +0100
commit19aea1f19895b035e8abb424987f48df6bc52c53 (patch)
tree879cb256f2985d2a6774b96cedad8b6752deb72c /src/parser.cpp
parent0e92166d442b120b06db57623a93c6ec43e3fccb (diff)
Basic call expression and fix to assignment count checking
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index ddf63d93c..184668c4b 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1232,7 +1232,8 @@ AstNode *parse_expr_list(AstFile *f, b32 lhs, isize *list_count_) {
isize list_count = 0;
do {
- DLIST_APPEND(list_root, list_curr, parse_expr(f, lhs));
+ AstNode *e = parse_expr(f, lhs);
+ DLIST_APPEND(list_root, list_curr, e);
list_count++;
if (f->cursor[0].kind != Token_Comma ||
f->cursor[0].kind == Token_EOF)
@@ -1259,6 +1260,7 @@ AstNode *parse_simple_stmt(AstFile *f) {
isize lhs_count = 0, rhs_count = 0;
AstNode *lhs_expr_list = parse_lhs_expr_list(f, &lhs_count);
+
AstNode *statement = NULL;
Token token = f->cursor[0];
switch (token.kind) {