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

Side by Side Diff: pkg/analyzer/lib/src/analyzer_impl.dart

Issue 200783006: Fix analysis of parts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer_impl; 5 library analyzer_impl;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 UriKind uriKind = getUriKind(sourceFile); 88 UriKind uriKind = getUriKind(sourceFile);
89 librarySource = new FileBasedSource.con2(sourceFile, uriKind); 89 librarySource = new FileBasedSource.con2(sourceFile, uriKind);
90 90
91 // prepare context 91 // prepare context
92 prepareAnalysisContext(sourceFile, librarySource); 92 prepareAnalysisContext(sourceFile, librarySource);
93 } 93 }
94 94
95 /// The sync version of analysis 95 /// The sync version of analysis
96 ErrorSeverity _analyzeSync() { 96 ErrorSeverity _analyzeSync() {
97 // don't try to analyze parts 97 // don't try to analyze parts
98 if (context.getKindOf(librarySource) == SourceKind.PART) { 98 if (context.computeKindOf(librarySource) == SourceKind.PART) {
99 print("Only libraries can be analyzed."); 99 print("Only libraries can be analyzed.");
100 print("$sourcePath is a part and can not be analyzed."); 100 print("$sourcePath is a part and can not be analyzed.");
101 return ErrorSeverity.ERROR; 101 return ErrorSeverity.ERROR;
102 } 102 }
103 // resolve library 103 // resolve library
104 var libraryElement = context.computeLibraryElement(librarySource); 104 var libraryElement = context.computeLibraryElement(librarySource);
105 // prepare source and errors 105 // prepare source and errors
106 prepareSources(libraryElement); 106 prepareSources(libraryElement);
107 prepareErrors(); 107 prepareErrors();
108 108
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 } 357 }
358 358
359 @override 359 @override
360 void logInformation2(String message, Exception exception) { 360 void logInformation2(String message, Exception exception) {
361 if (log) { 361 if (log) {
362 stdout.writeln(message); 362 stdout.writeln(message);
363 } 363 }
364 } 364 }
365 } 365 }
OLDNEW
« no previous file with comments | « editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698