* @param typeProvider the object used to access the types from the core library
*/
public ScopedVisitor(ResolvableLibrary library, Source source, TypeProvider typeProvider) {
this.definingLibrary = library.getLibraryElement();
this.source = source;
LibraryScope libraryScope = library.getLibraryScope();
this.errorListener = libraryScope.getErrorListener();
this.nameScope = libraryScope;
this.typeProvider = typeProvider;
}