@Override public ILexLocation defaultSValueImport(SValueImport node) throws AnalysisException { return node.getLocation(); }
if (node.getFrom() != null) expdef = question.assistantFactory.createPDefinitionListAssistant().findName(node.getFrom().getExportdefs(), node.getName(), NameScope.NAMES); PType type = node.getImportType(); AModuleModules from = node.getFrom(); ILexNameToken name = node.getName(); + from.getName(), node.getLocation(), node); TypeCheckerErrors.detail2("Import", type.toString(), "Export", exptype.toString());
@Override public List<PDefinition> defaultSValueImport(SValueImport imp, AModuleModules module) throws AnalysisException { List<PDefinition> list = new Vector<PDefinition>(); imp.setFrom(module); ILexNameToken name = imp.getName(); PDefinition expdef = af.createPDefinitionListAssistant().findName(module.getExportdefs(), name, NameScope.NAMES); if (expdef == null) { TypeCheckerErrors.report(3193, "No export declared for import of value " + name + " from " + module.getName(), imp.getLocation(), imp); } else { if (imp.getRenamed() != null) { expdef = AstFactory.newARenamedDefinition(imp.getRenamed(), expdef); } else { expdef = AstFactory.newAImportedDefinition(imp.getLocation(), expdef); } list.add(expdef); } return list; }
private SImportIR initValueImport(SValueImport vdmImport, SValueImportIR irImport, IRInfo question) throws AnalysisException { initImport(vdmImport, irImport); STypeIR importTypeCg = vdmImport.getImportType() != null ? vdmImport.getImportType().apply(question.getTypeVisitor(), question) : null; irImport.setImportType(importTypeCg); return irImport; }