summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
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);