| 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
|
|
|