aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-11 12:01:40 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-11 12:01:40 +0100
commitb2fdb69b4dd7f52f42414139a257b3800eb51a90 (patch)
tree5edf1abb568eb59c6c7da9ae25422e4804531a31 /src/parser.cpp
parentaf2736daec0e6579a006bd8d4567c977c8e56c45 (diff)
Named procedure calls
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 120bb63cc..d741e569f 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2128,6 +2128,11 @@ AstNode *parse_call_expr(AstFile *f, AstNode *operand) {
}
AstNode *arg = parse_expr(f, false);
+ if (f->curr_token.kind == Token_Eq) {
+ Token eq = expect_token(f, Token_Eq);
+ AstNode *value = parse_value(f);
+ arg = ast_field_value(f, arg, value, eq);
+ }
array_add(&args, arg);
if (!allow_token(f, Token_Comma)) {