aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index b5ca090a..59caabaa 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -478,6 +478,14 @@ PARSER(parse_parens) {
whitespace(&pos);
ast_t *expr = optional(ctx, &pos, parse_extended_expr);
if (!expr) return NULL;
+
+ ast_t *comprehension = parse_comprehension_suffix(ctx, expr);
+ while (comprehension) {
+ expr = comprehension;
+ pos = comprehension->end;
+ comprehension = parse_comprehension_suffix(ctx, expr);
+ }
+
whitespace(&pos);
expect_closing(ctx, &pos, ")", "I wasn't able to parse the rest of this expression");