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

Unified Diff: compiler/java/com/google/dart/compiler/common/HasSourceInfo.java

Issue 9651004: Make SourceInfo a class, rename its menthods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for formatting, lazily create LainesInfo Created 8 years, 9 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: compiler/java/com/google/dart/compiler/common/HasSourceInfo.java
diff --git a/compiler/java/com/google/dart/compiler/common/HasSourceInfo.java b/compiler/java/com/google/dart/compiler/common/HasSourceInfo.java
index bda3da9499657597a2a52fee3bbbd929917c04db..105aa68e1f5600d27f0e50e5f95837d52f5b3b1f 100644
--- a/compiler/java/com/google/dart/compiler/common/HasSourceInfo.java
+++ b/compiler/java/com/google/dart/compiler/common/HasSourceInfo.java
@@ -4,52 +4,19 @@
package com.google.dart.compiler.common;
-import com.google.dart.compiler.Source;
-
/**
* Abstract view of a class that has source info.
*/
public interface HasSourceInfo {
/**
- * Return the source info associated with this object.
+ * @return the {@link SourceInfo} associated with this object. May be {@link SourceInfo#UNKNOWN}
+ * but not <code>null</code>.
*/
SourceInfo getSourceInfo();
/**
- * Set the source info associated with this object. May only be called once.
- * @param info
+ * Set the {@link SourceInfo} associated with this object. May only be called only once.
*/
void setSourceInfo(SourceInfo info);
-
- /**
- * Sets the source range of the original source file where the source fragment
- * corresponding to this node was found.
- *
- * <p>
- * Each node in the subtree (other than the contrived nodes) carries source
- * range(s) information relating back to positions in the given source (the
- * given source itself is not remembered with the AST). The source range
- * usually begins at the first character of the first token corresponding to
- * the node; leading whitespace and comments are <b>not</b> included. The
- * source range usually extends through the last character of the last token
- * corresponding to the node; trailing whitespace and comments are <b>not</b>
- * included. There are a handful of exceptions (including the various body
- * declarations). Source ranges nest properly: the source range for a child is
- * always within the source range of its parent, and the source ranges of
- * sibling nodes never overlap.
- *
- * @param source the associated source
- * @param line the 1-based line index, or <code>-1</code>, if no source
- * location is available
- * @param column the 1-based column index, or <code>-1</code>, if no source
- * location is available
- * @param startPosition a 0-based character index, or <code>-1</code>, if no
- * source location is available
- * @param length a (possibly 0) length, or <code>-1</code>, if no source
- * location is available
- * @see SourceInfo#getSourceStart()
- * @see SourceInfo#getSourceLength()
- */
- void setSourceLocation(Source source, int line, int column, int startPosition, int length);
}

Powered by Google App Engine
This is Rietveld 408576698