aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-01 13:53:51 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-01 13:53:51 -0400
commitc2daf6a92895d9835ecf75118f7fa1f25ff0395f (patch)
tree98786db0bd2246874e362475bca5da5a95d15c77 /ast.h
parente3ad5fdaaae075b4080c86bd243f5c7f3b09972b (diff)
Clean up 'when' syntax
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/ast.h b/ast.h
index b0e924fa..4307532b 100644
--- a/ast.h
+++ b/ast.h
@@ -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,