summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-07-11 00:36:32 +0100
committerubq323 <ubq323@ubq323.website>2023-07-11 00:36:32 +0100
commit1e19e4c6e052909bf76a30b26f63dcf32576e994 (patch)
tree3632bd275f0735636aec5a8b9cf5f85796719b8a /ast.h
parent86c9a7e5c47c5c3eb70e06ea5e278de8022fd5b2 (diff)
parsing sexprs
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ast.h b/ast.h
index f352992..3647a7b 100644
--- a/ast.h
+++ b/ast.h
@@ -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);