diff options
author | Camil Staps | 2019-01-07 13:18:55 +0100 |
---|---|---|
committer | Camil Staps | 2019-01-07 13:18:55 +0100 |
commit | 1d185ced82b3356b1ac3d181a823efe0605b4f8a (patch) | |
tree | 31be77209de5fae9cfa468774864f82b9f2e0d75 | |
parent | Add vim-fuspel (diff) |
Fix clang errors
-rw-r--r-- | interpreter/eval.c | 2 | ||||
-rw-r--r-- | interpreter/graphs.c | 4 | ||||
-rw-r--r-- | interpreter/graphs.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/interpreter/eval.c b/interpreter/eval.c index 2ea2f0b..a63d51a 100644 --- a/interpreter/eval.c +++ b/interpreter/eval.c @@ -416,7 +416,7 @@ struct expression *eval_main(FILE *out, struct fuspel *rules debug_graphs = debug_graphs_enabled; #endif - main_node->kind = EXPR_NAME; + main_node->kind = NODE_NAME; main_node->used_count = 1; main_node->var1 = my_calloc(1, 5); strcpy(main_node->var1, "main"); diff --git a/interpreter/graphs.c b/interpreter/graphs.c index dca2c53..555d9e1 100644 --- a/interpreter/graphs.c +++ b/interpreter/graphs.c @@ -108,7 +108,7 @@ void cpy_expression_to_node(struct node *dst, struct expression *src) { if (!dst || !src) return; - dst->kind = src->kind; + dst->kind = (enum node_kind) src->kind; switch (src->kind) { case EXPR_INT: dst->var1 = src->var1; @@ -148,7 +148,7 @@ void cpy_node_to_expression(struct expression *dst, struct node *src) { free_expression(dst); - dst->kind = src->kind; + dst->kind = (enum expr_kind) src->kind; switch (src->kind) { case NODE_INT: dst->var1 = src->var1; diff --git a/interpreter/graphs.h b/interpreter/graphs.h index 28f81a9..e04a04c 100644 --- a/interpreter/graphs.h +++ b/interpreter/graphs.h @@ -4,7 +4,7 @@ #include <stdbool.h> #include "syntax.h" -enum node_kind{ +enum node_kind { NODE_INT, /* See expr_kind in syntax.h */ NODE_NAME, NODE_CODE, |