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

Unified Diff: pkg/analyzer/lib/src/generated/source_io.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_io.dart
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index 43dfb42947a6e0977e916b053dddcd9cda5b57b6..7a90a2a595b7a1bea9b2333477b49927d820eda4 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -11,6 +11,7 @@ import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:path/path.dart' as path;
+import 'package:source_span/source_span.dart' as source_span;
export 'package:analyzer/src/generated/source.dart';
@@ -146,6 +147,8 @@ class FileBasedSource extends Source {
*/
static final Map<String, int> _idTable = new HashMap<String, int>();
+ source_span.SourceFile _sourceFile;
+
/**
* The URI from which this source was originally derived.
*/
@@ -235,6 +238,10 @@ class FileBasedSource extends Source {
String get shortName => file.getName();
@override
+ source_span.SourceFile get sourceFile => _sourceFile ??=
+ new source_span.SourceFile(file.readAsStringSync(), url: uri);
Brian Wilkerson 2016/11/14 23:34:41 I haven't thought this through completely, but thi
+
+ @override
UriKind get uriKind {
String scheme = uri.scheme;
return UriKind.fromScheme(scheme);

Powered by Google App Engine
This is Rietveld 408576698