aboutsummaryrefslogtreecommitdiff
path: root/interpreter/graphs.h
diff options
context:
space:
mode:
authorCamil Staps2016-10-07 21:21:40 +0200
committerCamil Staps2016-10-07 21:21:40 +0200
commitf8e50700cd0eb93154f5c025ef20d428986b856c (patch)
treee239bc8748edf2b1b80bf532dd46b6ddb5ab8614 /interpreter/graphs.h
parentResolve #12, don't show code keyword in debug graph (diff)
Cleanup (resolves #9)
Diffstat (limited to 'interpreter/graphs.h')
-rw-r--r--interpreter/graphs.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/interpreter/graphs.h b/interpreter/graphs.h
index 204993c..6c82bcc 100644
--- a/interpreter/graphs.h
+++ b/interpreter/graphs.h
@@ -4,7 +4,7 @@
#include <stdbool.h>
#include "syntax.h"
-typedef enum {
+enum node_kind{
NODE_INT, /* See expr_kind in syntax.h */
NODE_NAME,
NODE_CODE,
@@ -13,23 +13,23 @@ typedef enum {
NODE_APP,
NODE_REDIRECT /* Redirect to another node */
-} node_kind;
+};
struct node {
- node_kind kind;
- void* var1;
- void* var2;
+ enum node_kind kind;
+ void *var1;
+ void *var2;
unsigned int used_count;
};
-void use_node(struct node* node, unsigned int count);
-void free_node(struct node* node, unsigned int count, bool free_first);
+void use_node(struct node *node, unsigned int count);
+void free_node(struct node *node, unsigned int count, bool free_first);
-struct node*** flatten_app_args(struct node** from, bool remove_redirs);
+struct node ***flatten_app_args(struct node **from, bool remove_redirs);
void remove_redirects(struct node *node);
-void cpy_expression_to_node(struct node* dst, expression* src);
-void cpy_node_to_expression(expression* dst, struct node* src);
+void cpy_expression_to_node(struct node *dst, struct expression *src);
+void cpy_node_to_expression(struct expression *dst, struct node *src);
#endif