aboutsummaryrefslogtreecommitdiff
path: root/node.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2018-01-05 23:42:24 +0100
committertomsmeding <tom.smeding@gmail.com>2018-01-05 23:42:24 +0100
commit3272b5d83d2e2167eed24748557df88bd66584ee (patch)
tree6b8f1574f6d6a44e11b74903516286f6249cb0b7 /node.h
parenta298cb75c4f586b83b304c7dc66cb555693ea1b8 (diff)
There's actually a chance that, correctly stringified, this will work
Diffstat (limited to 'node.h')
-rw-r--r--node.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/node.h b/node.h
index 81d0b26..f98257f 100644
--- a/node.h
+++ b/node.h
@@ -12,7 +12,8 @@ enum node_type {
N_FUNC_DECL, // rtype name [params] [body]
N_IF, // [cond] [body] [else-body]
N_WHILE, // [cond] [body]
- N_RETURN, // [value]
+ N_RETURN, // --
+ N_RETURNV, // [value]
N_NUM, // value
N_VAR, // name
N_BINOP, // [left] oper [right]
@@ -53,4 +54,6 @@ int node_list_length(struct node *node);
void node_delete_recursive(struct node *node);
+const char* node_type_string(enum node_type type);
+const char* oper_string(enum operator oper);
void node_print(const struct node *node, FILE *f, int indent);