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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/CompilationUnit.java

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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/task/ParseDartTask.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/CompilationUnit.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/CompilationUnit.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/CompilationUnit.java
index d75e5a9d5212c7ffacc53103ac71b84867c997e1..5a2fd63e8e2ec555ff3618b652c898ac99080ed1 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/CompilationUnit.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/CompilationUnit.java
@@ -16,6 +16,7 @@ package com.google.dart.engine.ast;
import com.google.dart.engine.element.CompilationUnitElement;
import com.google.dart.engine.scanner.Token;
import com.google.dart.engine.scanner.TokenType;
+import com.google.dart.engine.utilities.source.LineInfo;
import java.util.ArrayList;
import java.util.Arrays;
@@ -82,6 +83,11 @@ public class CompilationUnit extends ASTNode {
private CompilationUnitElement element;
/**
+ * The line information for this compilation unit.
+ */
+ private LineInfo lineInfo;
+
+ /**
* Initialize a newly created compilation unit to have the given directives and declarations.
*
* @param beginToken the first token in the token stream
@@ -151,6 +157,15 @@ public class CompilationUnit extends ASTNode {
return endToken.getOffset() + endToken.getLength();
}
+ /**
+ * Return the line information for this compilation unit.
+ *
+ * @return the line information for this compilation unit
+ */
+ public LineInfo getLineInfo() {
+ return lineInfo;
+ }
+
@Override
public int getOffset() {
return 0;
@@ -176,6 +191,15 @@ public class CompilationUnit extends ASTNode {
}
/**
+ * Set the line information for this compilation unit to the given line information.
+ *
+ * @param errors the line information to associate with this compilation unit
+ */
+ public void setLineInfo(LineInfo lineInfo) {
+ this.lineInfo = lineInfo;
+ }
+
+ /**
* Set the script tag at the beginning of the compilation unit to the given script tag.
*
* @param scriptTag the script tag at the beginning of the compilation unit
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/task/ParseDartTask.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698