Some declaration guards

This commit is contained in:
2022-08-15 03:12:10 +01:00
parent 4cda75df11
commit 8d12db7dbe
4 changed files with 26 additions and 4 deletions

View File

@@ -763,8 +763,10 @@ static void expressionStmt(Parser* parser, Node** nodeHandle) {
Node* ptr = NULL;
expression(parser, &ptr);
**nodeHandle = *ptr;
FREE(Node, ptr); //BUGFIX: this thread of execution is nuts
if (ptr != NULL) {
**nodeHandle = *ptr;
FREE(Node, ptr); //BUGFIX: this thread of execution is nuts
}
consume(parser, TOKEN_SEMICOLON, "Expected ';' at the end of expression statement");
}