Implemented groupings

This commit is contained in:
2022-08-07 15:04:19 +01:00
parent d7fda480fd
commit 9a415738d9
9 changed files with 124 additions and 21 deletions

View File

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