Package com.google.turbine.diag
Class LineMap
- java.lang.Object
-
- com.google.turbine.diag.LineMap
-
public class LineMap extends java.lang.ObjectConverts source positions to line and column information, for diagnostic formatting.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcolumn(int position)The zero-indexed column number of the given source position.static LineMapcreate(java.lang.String source)java.lang.Stringline(int position)The one-indexed line of the given source position.intlineNumber(int position)The one-indexed line number of the given source position.
-
-
-
Method Detail
-
create
public static LineMap create(java.lang.String source)
-
column
public int column(int position)
The zero-indexed column number of the given source position.
-
lineNumber
public int lineNumber(int position)
The one-indexed line number of the given source position.
-
line
public java.lang.String line(int position)
The one-indexed line of the given source position.
-
-