diff options
author | ubq323 <ubq323@ubq323.website> | 2023-07-11 00:36:32 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-07-11 00:36:32 +0100 |
commit | 1e19e4c6e052909bf76a30b26f63dcf32576e994 (patch) | |
tree | 3632bd275f0735636aec5a8b9cf5f85796719b8a /ast.h | |
parent | 86c9a7e5c47c5c3eb70e06ea5e278de8022fd5b2 (diff) |
parsing sexprs
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -5,9 +5,9 @@ #include <stddef.h> 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); |