From 1e19e4c6e052909bf76a30b26f63dcf32576e994 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 11 Jul 2023 00:36:32 +0100 Subject: parsing sexprs --- ast.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ast.h') diff --git a/ast.h b/ast.h index f352992..3647a7b 100644 --- a/ast.h +++ b/ast.h @@ -5,9 +5,9 @@ #include typedef enum { - AST_NOTHING, AST_LIST, AST_NUM, + AST_SYMBOL, } AstTy; struct _astnode; @@ -24,6 +24,7 @@ struct _astnode { union { int num; AstVec list; + char *str; } as; }; @@ -34,7 +35,9 @@ void astnode_append(AstNode *l, AstNode val); AstNode astnode_new_num(int n); AstNode astnode_new_list(); +AstNode astnode_new_symbol(char *s); +void astnode_disp(AstNode *a); -- cgit v1.2.3