* @throws AnalysisException if any of the identifiers could not be resolved or if the types in
* the library cannot be analyzed
*/
private void resolveReferencesAndTypesInLibrary(ResolvableLibrary library)
throws AnalysisException {
TimeCounterHandle timeCounter = PerformanceStatistics.resolve.start();
try {
for (ResolvableCompilationUnit unit : library.getResolvableCompilationUnits()) {
Source source = unit.getSource();
CompilationUnit ast = unit.getCompilationUnit();
ast.accept(new VariableResolverVisitor(library, source, typeProvider));
ResolverVisitor visitor = new ResolverVisitor(library, source, typeProvider);
ast.accept(visitor);
}
} finally {
timeCounter.stop();
}
// Angular
timeCounter = PerformanceStatistics.angular.start();
try {
for (ResolvableCompilationUnit unit : library.getResolvableCompilationUnits()) {
Source source = unit.getSource();
CompilationUnit ast = unit.getCompilationUnit();
new AngularCompilationUnitBuilder(errorListener, source, ast).build();
}
} finally {
timeCounter.stop();
}
// Polymer
timeCounter = PerformanceStatistics.polymer.start();
try {
for (Source source : library.getCompilationUnitSources()) {
CompilationUnit ast = library.getAST(source);
new PolymerCompilationUnitBuilder(ast).build();
}
} finally {
timeCounter.stop();
}
}