aboutsummaryrefslogtreecommitdiff
path: root/interpreter/parse.c
diff options
context:
space:
mode:
authorCamil Staps2016-09-24 15:14:01 +0200
committerCamil Staps2016-09-24 15:16:01 +0200
commite08cc0aa5f0eb0b99fb553623dd0600cf8aeb572 (patch)
tree5703244ba6b1016185597979b64f241d1fb66f85 /interpreter/parse.c
parentRemove unnecessary dependency (diff)
Made parse_file implementation dependent
Diffstat (limited to 'interpreter/parse.c')
-rw-r--r--interpreter/parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/interpreter/parse.c b/interpreter/parse.c
index 3a611e8..e0953d1 100644
--- a/interpreter/parse.c
+++ b/interpreter/parse.c
@@ -3,10 +3,11 @@
#include <string.h>
#include "code.h"
-#include "fuspel.h"
#include "log.h"
#include "mem.h"
+extern fuspel* import(fuspel* already_parsed, char* name);
+
token_list* parse_name(char** name, token_list* list) {
if (list->elem.kind != TOKEN_NAME)
return NULL;
@@ -260,7 +261,7 @@ fuspel* parse(token_list* list) {
list = list->rest;
if (!list || list->elem.kind != TOKEN_NAME)
return NULL;
- rules = parse_file(rules, list->elem.var);
+ rules = import(rules, list->elem.var);
if (!rules)
return NULL;