Pop types off for Binary Operator typechecking
This commit is contained in:
parent
de31585bcc
commit
6222aabc8b
|
@ -93,7 +93,7 @@ public final class TypeChecker
|
|||
doTypeCheck(actionList);
|
||||
|
||||
|
||||
|
||||
printTypeQueue();
|
||||
|
||||
|
||||
|
||||
|
@ -308,6 +308,9 @@ public final class TypeChecker
|
|||
/**
|
||||
* Typechecking (TODO)
|
||||
*/
|
||||
Type vRhsType = popType();
|
||||
Type vLhsType = popType();
|
||||
|
||||
|
||||
/**
|
||||
* Codegen
|
||||
|
@ -326,8 +329,7 @@ public final class TypeChecker
|
|||
/* Function calls */
|
||||
else if(cast(FunctionCall)statement)
|
||||
{
|
||||
/* TODO: Implement me */
|
||||
gprintln("FuncCall hehe (REMOVE AFTER DONE)");
|
||||
// gprintln("FuncCall hehe (REMOVE AFTER DONE)");
|
||||
// printTypeQueue();
|
||||
|
||||
FunctionCall funcCall = cast(FunctionCall)statement;
|
||||
|
@ -422,8 +424,6 @@ public final class TypeChecker
|
|||
*/
|
||||
addInstr(funcCallInstr);
|
||||
addType(getType(func.parentOf(), func.getType()));
|
||||
gprintln("Genaai");
|
||||
gprintln(getType(func.parentOf(), func.getType()));
|
||||
}
|
||||
}
|
||||
/* VariableAssigbmentDNode */
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
module simple;
|
||||
|
||||
discard "return 1;";
|
||||
|
||||
|
||||
int j = 1+func(2,test());
|
||||
|
||||
int func(int x1, byte x2)
|
||||
|
|
Loading…
Reference in New Issue