
package de.dhbwstuttgart.syntaxtree.statement;

import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import org.antlr.v4.runtime.Token;

public abstract class Expression extends SyntaxTreeNode
{
    private RefTypeOrTPHOrWildcardOrGeneric type;

    public Expression(RefTypeOrTPHOrWildcardOrGeneric type, Token offset){
        super(offset);
        if(type == null)throw new NullPointerException();
        this.type = type;
    }

    public RefTypeOrTPHOrWildcardOrGeneric getType(){
        return type;
    }

    public abstract ConstraintSet getConstraints(TypeInferenceBlockInformation info);
}
