Solved a function scope issue

This commit is contained in:
2022-09-05 16:39:09 +10:00
parent 33302ef318
commit f80709ae41
4 changed files with 36 additions and 69 deletions

View File

@@ -1195,6 +1195,9 @@ static void importStmt(Parser* parser, Node** nodeHandle) {
emitNodeImport(nodeHandle, NODE_IMPORT, idn, alias);
consume(parser, TOKEN_SEMICOLON, "Expected ';' at end of import statement");
freeLiteral(idn);
freeLiteral(alias);
}
static void exportStmt(Parser* parser, Node** nodeHandle) {
@@ -1217,6 +1220,9 @@ static void exportStmt(Parser* parser, Node** nodeHandle) {
emitNodeImport(nodeHandle, NODE_EXPORT, idn, alias);
consume(parser, TOKEN_SEMICOLON, "Expected ';' at end of export statement");
freeLiteral(idn);
freeLiteral(alias);
}
//precedence functions