com.google.dart.compiler.common
Interface SourceInfo

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SourceInfoImpl

public interface SourceInfo
extends java.io.Serializable

Tracks file and line information for AST nodes.


Method Summary
 int getColumn()
           
 int getLength()
          Returns the length in characters of the original source file indicating where the source fragment corresponding to this node ends.
 int getLine()
           
 Source getSource()
          The source code provider.
 int getStart()
          Returns the character index into the original source file indicating where the source fragment corresponding to this node begins.
 

Method Detail

getSource

Source getSource()
The source code provider.


getLine

int getLine()
Returns:
A 1-based line number into the original source file indicating where the source fragment begins.

getColumn

int getColumn()
Returns:
A 1-based column number into the original source file indicating where the source fragment begins.

getStart

int getStart()
Returns the character index into the original source file indicating where the source fragment corresponding to this node begins.

The parser supplies useful well-defined source ranges to the nodes it creates.

Returns:
the 0-based character index, or -1 if no source startPosition information is recorded for this node
See Also:
getLength(), HasSourceInfo#setSourceLocation(Source, int, int, int, int)

getLength

int getLength()
Returns the length in characters of the original source file indicating where the source fragment corresponding to this node ends.

The parser supplies useful well-defined source ranges to the nodes it creates.

Returns:
a (possibly 0) length, or 0 if no source source position information is recorded for this node
See Also:
getStart(), HasSourceInfo#setSourceLocation(Source, int, int, int, int)