Touched up the Scanner. Refactored the Interpreter some more, this time it's able to be run on simple expressions. String concatenation can be performed by the Interpreter however, numbers and Booleans are not being stored correctly in the Object structures.

This commit is contained in:
2022-03-15 20:50:08 +00:00
parent d4dd459389
commit b072921304
5 changed files with 85 additions and 18 deletions
+2
View File
@@ -1,6 +1,7 @@
#include "scanner.h"
#include "parser.h"
#include "expr.h"
#include "interpreter.h"
#include <stdio.h>
#include <stdlib.h>
#include <sysexits.h>
@@ -43,6 +44,7 @@ void RunFile(const char* path) {
Expr* tree = GenerateExpressionTree(tokens);
PrintExpressionTree(tree);
printf("\n");
Interpret(tree);
FreeExpressionTree(tree);
DestroyTokenList(tokens);
}