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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 2498133002: Connect analyzer's AnalysisError object to front_end's CompilationError. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index e4ceae7d5e77be2734924ba666dab8535b1581e9..5b1857adfe0a562b72ce7b8b5985794d8144e155 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -18,6 +18,7 @@ import 'package:front_end/src/base/source.dart';
import 'package:front_end/src/base/uri_kind.dart';
import 'package:package_config/packages.dart';
import 'package:path/path.dart' as pathos;
+import 'package:source_span/source_span.dart' as source_span;
export 'package:front_end/src/base/source.dart' show Source;
export 'package:front_end/src/base/uri_kind.dart' show UriKind;
@@ -370,6 +371,8 @@ class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
* An implementation of an non-existing [Source].
*/
class NonExistingSource extends Source {
+ source_span.SourceFile _sourceFile;
+
@override
final String fullName;
@@ -402,6 +405,10 @@ class NonExistingSource extends Source {
String get shortName => pathos.basename(fullName);
@override
+ source_span.SourceFile get sourceFile =>
+ _sourceFile ??= new source_span.SourceFile('', url: uri);
+
+ @override
bool operator ==(Object other) {
if (other is NonExistingSource) {
return other.uriKind == uriKind && other.fullName == fullName;

Powered by Google App Engine
This is Rietveld 408576698