/** * Creates a new tree field only constructor {@code ADurationStmIR TAG=duration} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param duration_ the {@link SExpIR} node for the {@code duration} child of this {@link ADurationStmIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ADurationStmIR} node */ public ADurationStmIR(SExpIR duration_, SStmIR stm_) { super(null,null,null); this.setDuration(duration_); this.setStm(stm_); }
/** * Creates a new complete constructor {@code ADurationStmIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param duration_ the {@link SExpIR} node for the {@code duration} child of this {@link ADurationStmIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ADurationStmIR} node */ public ADurationStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR duration_, SStmIR stm_) { super(sourceNode_,tag_,metaData_); this.setDuration(duration_); this.setStm(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; }