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