fixing still

This commit is contained in:
Partho
2025-04-25 13:37:32 -04:00
parent f0d81ff5fd
commit 95c37db9ff
3 changed files with 8 additions and 2 deletions

View File

@ -615,6 +615,7 @@ expression:
if(getTypeEntry((TableNode*)$2) == integ) {
char* temp = temp_var_gen();
TableNode* node = CreateEntry(cur,TYPE_PRIMITIVE, integ, temp, NULL);
emit_unary_op(E_NEG,node,tn_or_const(NODE,$2));
//NOTE ADD ASSIGNMENT EMIT HERE (MIGHT NEED TO PUSH TO STACK)
//result of unary operation
$$ = node;
@ -630,6 +631,7 @@ expression:
if(getTypeEntry((TableNode*)$2) == boo) {
char* temp = temp_var_gen();
TableNode* node = CreateEntry(cur,TYPE_PRIMITIVE, boo, temp, NULL);
emit_unary_op(E_NOT,node,tn_or_const(NODE,$2));
//NOTE ADD ASSIGNMENT EMIT HERE (MIGHT NEED TO PUSH TO STACK)
//result of unary operation
$$ = node;