aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interpreter/parse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/interpreter/parse.c b/interpreter/parse.c
index 9de6a15..2548262 100644
--- a/interpreter/parse.c
+++ b/interpreter/parse.c
@@ -148,6 +148,16 @@ bool parse_simple_expression(struct expression *expr, struct parsing_list *list)
list->i++;
return true;
}
+ } else if (list->tokens->elems[list->i].kind == TOKEN_COLON) {
+ list->i++;
+ if (!parse_simple_expression(expr->var2, list) ||
+ list->tokens->elems[list->i].kind != TOKEN_CLOSE_SQ) {
+ free_expression(expr);
+ return false;
+ } else {
+ list->i++;
+ return true;
+ }
}
default: