package de.dhbwstuttgart.syntaxtree;


import de.dhbwstuttgart.syntaxtree.ASTVisitor;
import de.dhbwstuttgart.syntaxtree.Pattern;
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.statement.Expression;
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 class LiteralPattern extends FormalParameter
{
    public final Expression value;
    public LiteralPattern(RefTypeOrTPHOrWildcardOrGeneric type, Expression value, Token offset) {
        super(null, type, offset);

        this.value = value;
    }
    @Override
    public FormalParameter withType(RefTypeOrTPHOrWildcardOrGeneric type) {
        return new LiteralPattern(type, value, getOffset());
    }
    @Override
    public void accept(ASTVisitor visitor) {
        visitor.visit(this);
    }
}
