package de.dhbwstuttgart.target.tree.expression;

import de.dhbwstuttgart.target.tree.type.TargetType;

public record TargetGuard(TargetPattern inner, TargetExpression expression) implements TargetPattern {
    @Override
    public TargetGuard withType(TargetType type) {
        return new TargetGuard(inner.withType(type), expression);
    }

    @Override
    public TargetType type() {
        return inner.type();
    }

    @Override
    public TargetGuard withName(String name) {
        return new TargetGuard(inner.withName(name), expression);
    }
}
