/** * Creates a new complete constructor {@code AAssignmentStmIR} 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 target_ the {@link SStateDesignatorIR} node for the {@code target} child of this {@link AAssignmentStmIR} node * @param exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AAssignmentStmIR} node */ public AAssignmentStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SStateDesignatorIR target_, SExpIR exp_) { super(sourceNode_,tag_,metaData_); this.setTarget(target_); this.setExp(exp_); }
/** * Creates a new tree field only constructor {@code AAssignmentStmIR TAG=assignment} 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 target_ the {@link SStateDesignatorIR} node for the {@code target} child of this {@link AAssignmentStmIR} node * @param exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AAssignmentStmIR} node */ public AAssignmentStmIR(SStateDesignatorIR target_, SExpIR exp_) { super(null,null,null); this.setTarget(target_); this.setExp(exp_); }
@Override public SStmIR caseAAssignmentStm(AAssignmentStm node, IRInfo question) throws AnalysisException { PStateDesignator target = node.getTarget(); PExp exp = node.getExp(); SStateDesignatorIR targetCg = target.apply(question.getStateDesignatorVisitor(), question); SExpIR expCg = exp.apply(question.getExpVisitor(), question); AAssignmentStmIR assignment = new AAssignmentStmIR(); assignment.setTarget(targetCg); assignment.setExp(expCg); return assignment; }