/** * Creates a new complete constructor {@code ATypeImportIR} 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 decl_ the {@link ATypeDeclIR} node for the {@code decl} child of this {@link ATypeImportIR} node */ public ATypeImportIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, String name_, String renamed_, String fromModuleName_, ATypeDeclIR decl_) { super(sourceNode_,tag_,metaData_,name_,renamed_,fromModuleName_); this.setDecl(decl_); }
/** * Creates a new tree field only constructor {@code ATypeImportIR TAG=type} 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 decl_ the {@link ATypeDeclIR} node for the {@code decl} child of this {@link ATypeImportIR} node */ public ATypeImportIR(String name_, String renamed_, String fromModuleName_, ATypeDeclIR decl_) { super(null,null,null,name_,renamed_,fromModuleName_); this.setDecl(decl_); }
@Override public SImportIR caseATypeImport(ATypeImport node, IRInfo question) throws AnalysisException { ATypeImportIR typeImportCg = new ATypeImportIR(); initImport(node, typeImportCg); SDeclIR typeDeclCg = node.getDef() != null ? node.getDef().apply(question.getDeclVisitor(), question) : null; if (typeDeclCg instanceof ATypeDeclIR) { typeImportCg.setDecl((ATypeDeclIR) typeDeclCg); } return typeImportCg; }