From de3eeacfa0151243e4ef52af3d6c2e2b731fc720 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 17 Feb 2024 16:56:19 -0500 Subject: Major cleanup --- ast.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'ast.h') diff --git a/ast.h b/ast.h index dade182d..b6f2b985 100644 --- a/ast.h +++ b/ast.h @@ -31,13 +31,6 @@ typedef struct arg_ast_s { struct arg_ast_s *next; } arg_ast_t; -typedef enum { - UNOP_UNKNOWN, - UNOP_NOT=1, UNOP_NEGATIVE, - UNOP_HEAP_ALLOCATE, - UNOP_STACK_REFERENCE, -} unop_e; - typedef enum { BINOP_UNKNOWN, BINOP_POWER=100, BINOP_MULT, BINOP_DIVIDE, BINOP_MOD, BINOP_MOD1, BINOP_PLUS, @@ -94,7 +87,8 @@ typedef enum { Int, Num, StringLiteral, StringJoin, Declare, Assign, - BinaryOp, UnaryOp, UpdateAssign, + BinaryOp, UpdateAssign, + Not, Negative, HeapAllocate, StackReference, Min, Max, Array, Table, TableEntry, FunctionDef, Lambda, @@ -155,9 +149,8 @@ struct ast_s { ast_t *rhs; } BinaryOp, UpdateAssign; struct { - unop_e op; ast_t *value; - } UnaryOp; + } Not, Negative, HeapAllocate, StackReference; struct { ast_t *lhs, *rhs, *key; } Min, Max; -- cgit v1.2.3