diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-08-19 20:44:53 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-08-19 20:52:28 +0200 |
commit | c9127b2bd399ce5d3e9483a82434948202592309 (patch) | |
tree | 7a6f682fb2fc47c83191fab0b7ad00c5dd45e604 /ast.h | |
parent | 15fb03902ff5550b3a8c44bde3e08df876449f7a (diff) |
Parsing and stringification works
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -39,6 +39,7 @@ typedef struct ASTsymbol{ //if you're not the interpreter: // if you just allocated the ASTsymbol yourself, set symid to -1; // else, leave symid alone. + //You should probably use ast_symbol(), in which case you don't have to do anything. } ASTsymbol; struct AST{ @@ -57,7 +58,10 @@ void ast_free(AST *ast); AST* ast_copy(const AST *ast); +char* ast_stringify(const AST *ast); + AST* ast_list(int len,AST **nodes); //these convenience functions DO NOT copy their arguments AST* ast_word(char *word); AST* ast_number(double num); +AST* ast_string(char *str,int len); AST* ast_symbol(char *name); |