Lots of runtime errors

This commit is contained in:
2022-08-30 12:09:11 +10:00
parent 14718a08d3
commit 3a4017cea5
5 changed files with 184 additions and 41 deletions

View File

@@ -3,6 +3,7 @@
#include "literal_array.h"
#include "literal_dictionary.h"
#include "scope.h"
#include "console_colors.h"
@@ -46,6 +47,10 @@ void freeLiteral(Literal literal) {
return;
}
if (IS_FUNCTION(literal)) {
popScope(AS_FUNCTION(literal).scope);
}
if (IS_IDENTIFIER(literal)) {
FREE_ARRAY(char, AS_IDENTIFIER(literal), literal.as.identifier.length);
return;