/** * Creates a deep clone of this {@link ADurationStmIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link ADurationStmIR} node */ public ADurationStmIR clone(Map<INode,INode> oldToNewMap) { ADurationStmIR node = new ADurationStmIR( _sourceNode, _tag, _metaData, cloneNode(_duration, oldToNewMap), cloneNode(_stm, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link ADurationStmIR} node. * @return a deep clone of this {@link ADurationStmIR} node */ public ADurationStmIR clone() { return new ADurationStmIR( _sourceNode, _tag, _metaData, cloneNode(_duration), cloneNode(_stm) ); }
@Override public SStmIR caseADurationStm(ADurationStm node, IRInfo question) throws AnalysisException { PExp duration = node.getDuration(); PStm stm = node.getStatement(); SExpIR durationCg = duration.apply(question.getExpVisitor(), question); SStmIR stmCg = stm.apply(question.getStmVisitor(), question); ADurationStmIR durStm = new ADurationStmIR(); durStm.setDuration(durationCg); durStm.setStm(stmCg); ; return durStm; }