diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-01 13:53:51 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-01 13:53:51 -0400 |
| commit | c2daf6a92895d9835ecf75118f7fa1f25ff0395f (patch) | |
| tree | 98786db0bd2246874e362475bca5da5a95d15c77 /ast.h | |
| parent | e3ad5fdaaae075b4080c86bd243f5c7f3b09972b (diff) | |
Clean up 'when' syntax
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -27,11 +27,6 @@ typedef struct ast_list_s { struct ast_list_s *next; } ast_list_t; -typedef struct when_clause_s { - ast_t *var, *tag_name, *body; - struct when_clause_s *next; -} when_clause_t; - typedef struct arg_ast_s { const char *name; type_ast_t *type; @@ -39,6 +34,13 @@ typedef struct arg_ast_s { struct arg_ast_s *next; } arg_ast_t; +typedef struct when_clause_s { + ast_t *tag_name; + ast_list_t *args; + ast_t *body; + struct when_clause_s *next; +} when_clause_t; + typedef enum { BINOP_UNKNOWN, BINOP_POWER=100, BINOP_MULT, BINOP_DIVIDE, BINOP_MOD, BINOP_MOD1, BINOP_PLUS, |
