Fixed an non-optimized grouping bug

This commit is contained in:
2022-08-07 16:46:54 +01:00
parent 072d9c59cc
commit 3b89e216cc
5 changed files with 19 additions and 3 deletions

View File

@@ -68,9 +68,9 @@ void writeCompiler(Compiler* compiler, Node* node) {
break;
case NODE_GROUPING:
compiler->bytecode[compiler->count++] = OP_GROUPING_BEGIN; //1 byte
compiler->bytecode[compiler->count++] = (unsigned char)OP_GROUPING_BEGIN; //1 byte
writeCompiler(compiler, node->grouping.child);
compiler->bytecode[compiler->count++] = OP_GROUPING_END; //1 byte
compiler->bytecode[compiler->count++] = (unsigned char)OP_GROUPING_END; //1 byte
break;
}
}