package de.bmoth.parser.ast.nodes;

public class ConditionSubstitutionNode extends SubstitutionNode {
    private PredicateNode condition;
    private SubstitutionNode substitution;

    public enum ConditionSubstitutionKind {
        PRECONDITION, ASSERT
    }

    public ConditionSubstitutionNode(PredicateNode condition,
                                     SubstitutionNode substitution) {
        this.condition = condition;
        this.substitution = substitution;
        super.setAssignedVariables(substitution.getAssignedVariables());
    }

    public SubstitutionNode getSubstitution() {
        return substitution;
    }

    public PredicateNode getCondition() {
        return condition;
    }

    @Override
    public String toString() {
        return "SELECT " + condition + " THEN " + substitution + " END";
    }

    public void setSubstitution(SubstitutionNode substitution) {
        this.substitution = substitution;
    }

    public void setCondition(PredicateNode predicate) {
        this.condition = predicate;
    }
}

@@ -180,88 +180,8 @@
 n;%0A%0A
-    public enum ConditionSubstitutionKind %7B%0A        PRECONDITION, ASSERT%0A    %7D%0A%0A
     

remove unused enum