/** * Returns a deep clone of this {@link AFunctionExportIR} node. * @return a deep clone of this {@link AFunctionExportIR} node */ public AFunctionExportIR clone() { return new AFunctionExportIR( _sourceNode, _tag, _metaData, cloneList(_decl), cloneList(_nameList), _exportType ); }
/** * Creates a new complete constructor {@code AFunctionExportIR} 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 nameList_ the {@link NodeList} node for the {@code nameList} child of this {@link AFunctionExportIR} node * @param exportType_ the {@link STypeIR} <b>graph</a> node for the {@code exportType} child of this {@link AFunctionExportIR} node. * <i>The parent of this {@code exportType } will not be changed by adding it to this node.</i> */ public AFunctionExportIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, List<? extends SDeclIR> decl_, List<? extends ATokenNameIR> nameList_, STypeIR exportType_) { super(sourceNode_,tag_,metaData_,decl_); this.setNameList(nameList_); this.setExportType(exportType_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof AFunctionExportIR) { return toString().equals(o.toString()); } return false; }
List<SDeclIR> copy = new ArrayList<SDeclIR>(node.getDecl()); for( SDeclIR e : copy) List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getNameList()); for( ATokenNameIR e : copy) if(node.getExportType() != null && !_visitedNodes.contains(node.getExportType())) node.getExportType().apply(this);
@Override public SExportIR caseAFunctionExport(AFunctionExport node, IRInfo question) throws AnalysisException { AFunctionExportIR funcExportCg = new AFunctionExportIR(); funcExportCg.setNameList(consNames(node.getNameList())); funcExportCg.setExportType(consExportType(node.getExportType(), question)); return addDecl(node, funcExportCg, question); }
/** * Creates a new tree field only constructor {@code AFunctionExportIR TAG=function} 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 nameList_ the {@link NodeList} node for the {@code nameList} child of this {@link AFunctionExportIR} node */ public AFunctionExportIR(List<? extends SDeclIR> decl_, List<? extends ATokenNameIR> nameList_) { super(null,null,null,decl_); this.setNameList(nameList_); }
List<SDeclIR> copy = new ArrayList<SDeclIR>(node.getDecl()); for( SDeclIR e : copy) List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getNameList()); for( ATokenNameIR e : copy) if(node.getExportType() != null && !_visitedNodes.contains(node.getExportType())) node.getExportType().apply(this);
List<SDeclIR> copy = new ArrayList<SDeclIR>(node.getDecl()); for( SDeclIR e : copy) List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getNameList()); for( ATokenNameIR e : copy) if(node.getExportType() != null && !_visitedNodes.contains(node.getExportType())) node.getExportType().apply(this, question);
/** * Creates a deep clone of this {@link AFunctionExportIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AFunctionExportIR} node */ public AFunctionExportIR clone(Map<INode,INode> oldToNewMap) { AFunctionExportIR node = new AFunctionExportIR( _sourceNode, _tag, _metaData, cloneList(_decl, oldToNewMap), cloneList(_nameList, oldToNewMap), _exportType ); oldToNewMap.put(this, node); return node; }
List<SDeclIR> copy = new ArrayList<SDeclIR>(node.getDecl()); for( SDeclIR e : copy) List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getNameList()); for( ATokenNameIR e : copy) if(node.getExportType() != null && !_visitedNodes.contains(node.getExportType())) mergeReturns(retVal,node.getExportType().apply(this));
List<SDeclIR> copy = new ArrayList<SDeclIR>(node.getDecl()); for( SDeclIR e : copy) List<ATokenNameIR> copy = new ArrayList<ATokenNameIR>(node.getNameList()); for( ATokenNameIR e : copy) if(node.getExportType() != null && !_visitedNodes.contains(node.getExportType())) mergeReturns(retVal,node.getExportType().apply(this, question));