Attempting to print the expression tree. I think the printing code is fine but the Parser is bugged and not building the tree correctly.

This commit is contained in:
2022-03-02 21:43:22 +00:00
parent 221d575c16
commit 7bf7304bd4
2 changed files with 24 additions and 2 deletions
+2
View File
@@ -39,7 +39,9 @@ void RunFile(const char* path) {
TokenList* tokens = ScanTokens(contents);
free(contents);
Print(tokens);
printf("TREE:\n");
Expr* tree = GenerateExpressionTree(tokens);
PrintExpressionTree(tree);
FreeExpressionTree(tree);
DestroyTokenList(tokens);
}