/** * Creates a new tree field only constructor {@code ASetCompAddStmIR TAG=setCompAdd} 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 ASetCompAddStmIR} node * @param element_ the {@link SExpIR} node for the {@code element} child of this {@link ASetCompAddStmIR} node */ public ASetCompAddStmIR(SExpIR set_, SExpIR element_) { super(null,null,null); this.setSet(set_); this.setElement(element_); }
/** * Creates a new complete constructor {@code ASetCompAddStmIR} 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 ASetCompAddStmIR} node * @param element_ the {@link SExpIR} node for the {@code element} child of this {@link ASetCompAddStmIR} node */ public ASetCompAddStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR set_, SExpIR element_) { super(sourceNode_,tag_,metaData_); this.setSet(set_); this.setElement(element_); }
@Override protected List<SStmIR> getConditionalAdd(AIdentifierVarExpIR setVar, List<SPatternIR> patterns, SPatternIR pattern) { AIdentifierVarExpIR setCompResult = new AIdentifierVarExpIR(); setCompResult.setType(compType.clone()); setCompResult.setName(idPattern.getName()); setCompResult.setIsLambda(false); setCompResult.setIsLocal(true); ASetCompAddStmIR add = new ASetCompAddStmIR(); add.setSet(setCompResult); add.setElement(first.clone()); return consConditionalAdd(setCompResult, add); } }