/** * Creates a new complete constructor {@code ASetBindIR} 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 set_ the {@link SExpIR} node for the {@code set} child of this {@link ASetBindIR} node */ public ASetBindIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SPatternIR pattern_, SExpIR set_) { super(sourceNode_,tag_,metaData_,pattern_); this.setSet(set_); }
/** * Creates a new tree field only constructor {@code ASetBindIR TAG=set} 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 set_ the {@link SExpIR} node for the {@code set} child of this {@link ASetBindIR} node */ public ASetBindIR(SPatternIR pattern_, SExpIR set_) { super(null,null,null,pattern_); this.setSet(set_); }
@Override public SBindIR caseASetBind(ASetBind node, IRInfo question) throws AnalysisException { PPattern pattern = node.getPattern(); SPatternIR patternCg = pattern.apply(question.getPatternVisitor(), question); PExp set = node.getSet(); SExpIR setCg = set.apply(question.getExpVisitor(), question); ASetBindIR setBind = new ASetBindIR(); setBind.setPattern(patternCg); setBind.setSet(setCg); return setBind; }