Expression statements and assignemnts are working

This commit is contained in:
2022-08-14 19:57:15 +01:00
parent e9ab6f3f96
commit 4aa6f75ea7
7 changed files with 112 additions and 50 deletions

View File

@@ -78,6 +78,7 @@ unsigned char* compileString(char* source, size_t* size) {
while(node != NULL) {
//pack up and leave
if (node->type == NODE_ERROR) {
printf(ERROR "error node detected\n" RESET);
freeNode(node);
freeCompiler(&compiler);
freeParser(&parser);
@@ -163,6 +164,7 @@ void repl() {
while(node != NULL) {
//pack up and restart
if (node->type == NODE_ERROR) {
printf(ERROR "error node detected\n" RESET);
error = true;
freeNode(node);
break;