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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_ast.dart

Issue 2225893003: Provide LINE_INFO from ResynthesizerResultProvider. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
Index: pkg/analyzer/lib/src/summary/summarize_ast.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index dd809067f5b1663e4dd8599fb431ab39bd6741dd..ec4f609bf0095735de101854ce040701c11a3501 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -17,10 +17,8 @@ import 'package:analyzer/src/summary/summarize_const_expr.dart';
/**
* Serialize all the declarations in [compilationUnit] to an unlinked summary.
*/
-UnlinkedUnitBuilder serializeAstUnlinked(
- CompilationUnit compilationUnit, List<int> lineStarts) {
- return new _SummarizeAstVisitor()
- .serializeCompilationUnit(compilationUnit, lineStarts);
+UnlinkedUnitBuilder serializeAstUnlinked(CompilationUnit compilationUnit) {
+ return new _SummarizeAstVisitor().serializeCompilationUnit(compilationUnit);
}
/**
@@ -506,14 +504,14 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
* Main entry point for serializing an AST.
*/
UnlinkedUnitBuilder serializeCompilationUnit(
- CompilationUnit compilationUnit, List<int> lineStarts) {
+ CompilationUnit compilationUnit) {
compilationUnit.directives.accept(this);
if (!hasCoreBeenImported) {
unlinkedImports.add(new UnlinkedImportBuilder(isImplicit: true));
}
compilationUnit.declarations.accept(this);
UnlinkedUnitBuilder b = new UnlinkedUnitBuilder();
- b.lineStarts = lineStarts;
+ b.lineStarts = compilationUnit.lineInfo?.lineStarts;
b.libraryName = libraryName;
b.libraryNameOffset = libraryNameOffset;
b.libraryNameLength = libraryNameLength;
« no previous file with comments | « pkg/analyzer/lib/src/summary/package_bundle_reader.dart ('k') | pkg/analyzer/test/src/summary/package_bundle_reader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698