Package org.openquark.cal.compiler.CodeAnalyser

Examples of org.openquark.cal.compiler.CodeAnalyser.QualificationResults


            ModuleNameResolver oldExpressionContextModuleNameResolver = moduleTypeInfo.getModuleNameResolver();
            String newExpressionString = typeChecker.calculateUpdatedCodeExpression(oldExpression.getExpressionText(), oldExpression.getModuleContext(), oldExpressionContextModuleNameResolver, oldExpression.getQualificationMap(), oldName, newName, category, null);
           
            CodeAnalyser codeAnalyser = new CodeAnalyser(typeChecker, moduleTypeInfo, false, false);
            MessageLogger logger = new MessageLogger();
            QualificationResults qualificationResults = codeAnalyser.qualifyExpression(newExpressionString, null, oldExpression.getQualificationMap(), logger);
            if (qualificationResults == null) {
                // failed to parse.
                String featureName = functionalAgentMetadata.getFeatureName().getName();
                String errorMessage =
                    "Can not update the metadata for " + featureName + ", example " + (i + 1) + ", since it could not be parsed.\n" +
                    "Compiler messages (if any): " + logger.getCompilerMessages(Severity.ERROR);
               
                status.add(new Status(Status.Severity.WARNING, errorMessage));
                continue;
            }
           
            String qualifiedNewExpressionString = qualificationResults.getQualifiedCode();
           
            // Update the qualification map
            CodeQualificationMap newQualifiedMap = oldExpression.getQualificationMap();                       
            boolean qualificationMapWasUpdated = updateQualificationMap(newQualifiedMap);
            boolean moduleContextNeedsUpdating =
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.CodeAnalyser.QualificationResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.