@Override public void visitConditionalBranching(ConditionalBranching conditionalBranching) { conditionalBranching.getCondition().accept(this); conditionalBranching.getTrueBlock().accept(this); if (conditionalBranching.hasFalseBlock()) { conditionalBranching.getFalseBlock().accept(this); } else if (conditionalBranching.hasElseConditionalBranching()) { conditionalBranching.getElseConditionalBranching().accept(this); } }
@Override public void visitConditionalBranching(ConditionalBranching conditionalBranching) { incr(); space(); System.out.println("Conditional"); conditionalBranching.getCondition().accept(this); conditionalBranching.getTrueBlock().accept(this); if (conditionalBranching.hasFalseBlock()) { conditionalBranching.getFalseBlock().accept(this); } else if (conditionalBranching.hasElseConditionalBranching()) { conditionalBranching.getElseConditionalBranching().accept(this); } decr(); }