Further refactoring done. The Parser runs without crashing, however it's output is still to be checked and verified.

This commit is contained in:
2022-03-02 21:24:58 +00:00
parent e20ccb8cfb
commit 221d575c16
6 changed files with 85 additions and 64 deletions
+4 -1
View File
@@ -1,4 +1,6 @@
#include "scanner.h"
#include "parser.h"
#include "expr.h"
#include <stdio.h>
#include <stdlib.h>
#include <sysexits.h>
@@ -37,7 +39,8 @@ void RunFile(const char* path) {
TokenList* tokens = ScanTokens(contents);
free(contents);
Print(tokens);
Expr* tree = GenerateExpressionTree(tokens);
FreeExpressionTree(tree);
DestroyTokenList(tokens);
}