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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/ast.dart

Issue 29083004: Restore CompilationUnit.lineInfo in Java and Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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_experimental/lib/src/generated/ast.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/ast.dart b/pkg/analyzer_experimental/lib/src/generated/ast.dart
index 5a2b0a88dfb81a574c38adf39d922ddcda5e540f..e377a4686ab2ffe2eac429bc77b20c49a7926e78 100644
--- a/pkg/analyzer_experimental/lib/src/generated/ast.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/ast.dart
@@ -4,7 +4,7 @@ library engine.ast;
import 'dart:collection';
import 'java_core.dart';
import 'java_engine.dart';
-import 'package:analyzer_experimental/src/generated/source.dart' show LineInfo;
+import 'source.dart' show LineInfo;
import 'scanner.dart';
import 'engine.dart' show AnalysisEngine;
import 'utilities_dart.dart';
@@ -2744,10 +2744,6 @@ class CommentReference extends ASTNode {
* @coverage dart.engine.ast
*/
class CompilationUnit extends ASTNode {
- /**
- * The line information for this compilation unit.
- */
- LineInfo lineInfo;
/**
* The first token in the token stream that was parsed to form this compilation unit.
@@ -2783,6 +2779,11 @@ class CompilationUnit extends ASTNode {
CompilationUnitElement element;
/**
+ * The line information for this compilation unit.
+ */
+ LineInfo lineInfo;
+
+ /**
* Initialize a newly created compilation unit to have the given directives and declarations.
*
* @param beginToken the first token in the token stream
@@ -14509,6 +14510,7 @@ class ASTCloner implements ASTVisitor<ASTNode> {
CommentReference visitCommentReference(CommentReference node) => new CommentReference.full(node.newKeyword, clone2(node.identifier));
CompilationUnit visitCompilationUnit(CompilationUnit node) {
CompilationUnit clone = new CompilationUnit.full(node.beginToken, clone2(node.scriptTag), clone3(node.directives), clone3(node.declarations), node.endToken);
+ clone.lineInfo = node.lineInfo;
return clone;
}
ConditionalExpression visitConditionalExpression(ConditionalExpression node) => new ConditionalExpression.full(clone2(node.condition), node.question, clone2(node.thenExpression), node.colon, clone2(node.elseExpression));
« no previous file with comments | « pkg/analyzer_experimental/lib/analyzer.dart ('k') | pkg/analyzer_experimental/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698