Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1049013002: Remove directives validation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index a89e52b6c7291e0ac24301059df0fec91bee446d..83a174b1a7ab35af91fd190fd8a2dc0e30e7a143 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -2243,17 +2243,13 @@ class VerifyUnitTask extends SourceBasedAnalysisTask {
errorReporter = new ErrorReporter(errorListener, source);
TypeProvider typeProvider = context.typeProvider;
//
- // Prepare inputs. TODO
+ // Prepare inputs.
//
CompilationUnit unit = getRequiredInput(UNIT_INPUT);
CompilationUnitElement unitElement = unit.element;
LibraryElement libraryElement = unitElement.library;
//
- // Validate the directives
- //
- _validateDirectives(unit);
- //
- // Use the ErrorVerifier to compute the rest of the errors.
+ // Use the ErrorVerifier to compute errors.
//
ErrorVerifier errorVerifier = new ErrorVerifier(errorReporter,
libraryElement, typeProvider, new InheritanceManager(libraryElement));
@@ -2265,39 +2261,6 @@ class VerifyUnitTask extends SourceBasedAnalysisTask {
}
/**
- * Check each directive in the given [unit] to see if the referenced source
- * exists and report an error if it does not.
- */
- void _validateDirectives(CompilationUnit unit) {
- for (Directive directive in unit.directives) {
- if (directive is UriBasedDirective) {
- _validateReferencedSource(directive);
- }
- }
- }
-
- /**
- * Check the given [directive] to see if the referenced source exists and
- * report an error if it does not.
- */
- void _validateReferencedSource(UriBasedDirective directive) {
- Source source = directive.source;
- if (source != null) {
- if (context.exists(source)) {
- return;
- }
- } else {
- // Don't report errors already reported by ParseDartTask.resolveDirective
- if (directive.validate() != null) {
- return;
- }
- }
- StringLiteral uriLiteral = directive.uri;
- errorReporter.reportErrorForNode(CompileTimeErrorCode.URI_DOES_NOT_EXIST,
- uriLiteral, [directive.uriContent]);
- }
-
- /**
* Return a map from the names of the inputs of this kind of task to the task
* input descriptors describing those inputs for a task with the
* given [target].
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698