Enhanced C#
Language of your choice: library documentation
|
This interface is for classes that can convert indexes to SourcePos structures and back. More...
This interface is for classes that can convert indexes to SourcePos structures and back.
Public Member Functions | |
int | LineToIndex (int lineNo) |
Returns the index in a source file of the beginning of the specified line, where the first line is number 1, not 0. More... | |
int | LineToIndex (ILineAndColumn pos) |
Public Member Functions inherited from Loyc.Syntax.IIndexToLine | |
ILineColumnFile | IndexToLine (int index) |
Returns the position in a source file of the specified index. More... | |
Additional Inherited Members | |
Properties inherited from Loyc.Syntax.IHasFileName | |
string | FileName [get] |
int Loyc.Syntax.IIndexPositionMapper.LineToIndex | ( | int | lineNo | ) |
Returns the index in a source file of the beginning of the specified line, where the first line is number 1, not 0.
If lineNo is zero, this method should return -1 (signifying an unknown location). If lineNo is larger than the largest line number, this method should return the index of end-of-file.
Implemented in Loyc.Syntax.IndexPositionMapper< CharSource >, Loyc.Syntax.SourceFileWithLineRemaps, and Loyc.Syntax.EmptySourceFile.