diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-10 22:59:41 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-10 23:01:35 +0200 |
| commit | 2d90cea9adb9a3f73cd5b211a4ed9508b505729f (patch) | |
| tree | 78f9cde6d162fbda9352d2c668ac00a298815b19 /include/ek/ast.h | |
| parent | dbf3ed3db10f9fa9157d661704e16ba5b73b0e84 (diff) | |
| download | ek-2d90cea9adb9a3f73cd5b211a4ed9508b505729f.tar.gz ek-2d90cea9adb9a3f73cd5b211a4ed9508b505729f.zip | |
initial struct continuations implemented
Diffstat (limited to 'include/ek/ast.h')
| -rw-r--r-- | include/ek/ast.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ek/ast.h b/include/ek/ast.h index 9107e8a..f8ffd8b 100644 --- a/include/ek/ast.h +++ b/include/ek/ast.h @@ -238,6 +238,7 @@ struct ast { enum ast_flags f; struct ast *n; + struct ast *chain; struct src_loc loc; struct scope *scope; }; @@ -584,7 +585,7 @@ static inline bool is_primitive(struct type *t) #define struct_cont_id(x) return_s(x, AST_STRUCT_CONT_DEF) #define struct_cont_params(x) return_a0(x, AST_STRUCT_CONT_DEF) #define struct_cont_behav(x) return_t1(x, AST_STRUCT_CONT_DEF) -#define struct_cont_body(x) return_a2(x, AST_STRUCT_CONT_DEF) +#define struct_cont_body(x) return_a1(x, AST_STRUCT_CONT_DEF) #define gen_struct_cont(id, params, behav, body, loc) \ gen_ast(AST_STRUCT_CONT_DEF, params, body, NULL, NULL, behav, id, 0, \ loc) @@ -744,4 +745,6 @@ struct type *reverse_type_list(struct type *root); #define foreach_type(iter, nodes) \ for (struct type *iter = nodes; iter; iter = iter->n) +struct ast *chain_base(struct ast *node); + #endif /* AST_H */ |
