summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index 7fefa70..6aa66a3 100644
--- a/main.c
+++ b/main.c
@@ -9,6 +9,7 @@
#include <stdbool.h>
#include "util/err.c"
#include "util/arr.c"
+#include "util/blockarr.c"
#include "identifiers.c"
#include "tokenizer.c"
#include "parse.c"
@@ -50,15 +51,16 @@ int main(int argc, char **argv) {
return EXIT_FAILURE;
}
- arr_foreach(t.tokens, Token, token) {
+ arr_foreach(&t.tokens, Token, token) {
if (token != t.tokens.data)
printf(" ");
token_fprint(stdout, token);
}
printf("\n");
-
+ Parser p;
+ parser_from_tokenizer(&p, &t);
ParsedFile f;
- if (!parse_file(&f, &t)) {
+ if (!file_parse(&f, &p)) {
err_fprint(TEXT_IMPORTANT("Errors occured while parsing.\n"));
return EXIT_FAILURE;
}