Further refactoring done. The Parser runs without crashing, however it's output is still to be checked and verified.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user