@Override public void inATernaryIfExpIR(ATernaryIfExpIR node) throws AnalysisException { INode parent = node.parent(); if (parent instanceof AReturnStmIR) { AIfStmIR ifStm = new AIfStmIR(); ifStm.setSourceNode(node.getSourceNode()); ifStm.setIfExp(node.getCondition().clone()); AReturnStmIR thenStm = new AReturnStmIR(); thenStm.setExp(node.getTrueValue().clone()); ifStm.setThenStm(thenStm); AReturnStmIR elseStm = new AReturnStmIR(); elseStm.setExp(node.getFalseValue().clone()); ifStm.setElseStm(elseStm); baseAssistant.replaceNodeWithRecursively(parent, ifStm, this); } } }