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

Unified Diff: pkg/dev_compiler/lib/src/compiler/source_map_printer.dart

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Address review comments Created 4 years 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/dev_compiler/lib/src/compiler/source_map_printer.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
index 3a12972bec7030b8930519f847f32ce4c9151f8c..b7621efa35a8903f1277c024bb0db386add50569 100644
--- a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
+++ b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
import 'package:source_maps/source_maps.dart' hide Printer;
import 'package:source_span/source_span.dart' show SourceLocation;
@@ -48,7 +49,8 @@ class SourceMapPrintingContext extends JS.SimpleJavaScriptPrintingContext {
// parts.
_currentTopLevelDeclaration = node;
unit = node.getAncestor((n) => n is CompilationUnit);
- sourcePath = unit.element.source.fullName;
+ sourcePath =
+ resolutionMap.elementForCompilationUnit(unit).source.fullName;
}
_mark(node.offset, _getIdentifier(node));

Powered by Google App Engine
This is Rietveld 408576698