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

@@ -60,6 +60,15 @@ void emitNodeBinary(Node** nodeHandle, Node* rhs, Opcode opcode) {
*nodeHandle = tmp;
}
void emitNodeGrouping(Node** nodeHandle) {
Node* tmp = ALLOCATE(Node, 1);
tmp->type = NODE_GROUPING;
tmp->grouping.child = NULL;
*nodeHandle = tmp;
}
void printNode(Node* node) {
switch(node->type) {
case NODE_LITERAL: