Touched up the Scanner. Refactored the Parser some more, this time it's able to be run on simple expressions. String concatenation can be performed by the Parser however, numbers and Booleans are not being stored correctly in the Object structures.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user