private void resolveReferencesAndTypesInLibrary(Library library) throws AnalysisException {
TimeCounterHandle timeCounter = PerformanceStatistics.resolve.start();
try {
for (Source source : library.getCompilationUnitSources()) {
CompilationUnit ast = library.getAST(source);
ast.accept(new VariableResolverVisitor(library, source, typeProvider));
ResolverVisitor visitor = new ResolverVisitor(library, source, typeProvider);
ast.accept(visitor);
}
} finally {
timeCounter.stop();