aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-07-13 17:17:58 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-07-13 17:17:58 -0400
commit445f79cb70e72698283539b65e43fc71a47ad311 (patch)
tree9a1b0b027a1957fc0f6351e21ef53ce7ff53259a /ast.h
parent3db57b4d2e16ab25fbd07401ec7b3a738f8dae8a (diff)
Add iterator functions
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ast.h b/ast.h
index 849f91c8..be37c8cb 100644
--- a/ast.h
+++ b/ast.h
@@ -186,7 +186,8 @@ struct ast_s {
ast_t *key, *value;
} TableEntry;
struct {
- ast_t *expr, *key, *value, *iter, *filter;
+ ast_list_t *vars;
+ ast_t *expr, *iter, *filter;
} Comprehension;
struct {
ast_t *name;
@@ -214,7 +215,8 @@ struct ast_s {
ast_list_t *statements;
} Block;
struct {
- ast_t *index, *value, *iter, *body, *empty;
+ ast_list_t *vars;
+ ast_t *iter, *body, *empty;
} For;
struct {
ast_t *condition, *body;