Compare commits

..

No commits in common. "aed7af7c681184016ecfd9d71a9f6d4cdf83b943" and "aa8a647fa1bbfa9fc9355c1ebf10dfe7e66a8f13" have entirely different histories.

3 changed files with 1 additions and 10 deletions

View File

@ -26,7 +26,6 @@
<mainClass>Compiler</mainClass>
</manifest>
</archive>
<finalName>NichtHaskellCompiler</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>

View File

@ -15,9 +15,8 @@ import java.util.Objects;
public class BinaryExpression extends AbstractType implements IExpression{
public String operator;
public IExpression left;
public IExpression left; // This needs TypeCheckResult
public IExpression right;
public String thisClass;
public BinaryExpression(String operator, IExpression left, IExpression right) {
this.operator = operator;
@ -29,10 +28,6 @@ public class BinaryExpression extends AbstractType implements IExpression{
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, ParameterList>>> methodContext, HashMap<String, HashMap<String, String>> typeContext, HashMap<String, String> localVars) throws TypeCheckException {
TypeCheckResult result = new TypeCheckResult();
if(left instanceof LocalVarIdentifier localVarIdentifier)
localVarIdentifier.thisClass = this.thisClass;
if(right instanceof LocalVarIdentifier localVarIdentifier)
localVarIdentifier.thisClass = this.thisClass;
TypeCheckResult leftType = left.typeCheck(methodContext, typeContext, localVars);
TypeCheckResult rightType = right.typeCheck(methodContext, typeContext, localVars);

View File

@ -4,7 +4,6 @@ import TypeCheck.AbstractType;
import TypeCheck.TypeCheckException;
import TypeCheck.TypeCheckHelper;
import TypeCheck.TypeCheckResult;
import abstractSyntaxTree.Expression.BinaryExpression;
import abstractSyntaxTree.Expression.IExpression;
import abstractSyntaxTree.Expression.InstVarExpression;
import abstractSyntaxTree.Expression.LocalVarIdentifier;
@ -55,8 +54,6 @@ public class AssignStatementExpression extends AbstractType implements IExpressi
methodCallStatementExpression.thisClass = this.thisClass;
if(right instanceof LocalVarIdentifier localVarIdentifierRight)
localVarIdentifierRight.thisClass = this.thisClass;
if(right instanceof BinaryExpression binaryExpression)
binaryExpression.thisClass = this.thisClass;
TypeCheckResult rightType = right.typeCheck(methodContext, typeContext, localVars);