Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | List of all members
Loyc.Syntax.ILineToIndex Interface Reference

Contains LineToIndex methods. More...


Source file:
Inheritance diagram for Loyc.Syntax.ILineToIndex:
Loyc.Syntax.IFileName Loyc.Syntax.IIndexPositionMapper Loyc.Syntax.IndexPositionMapper< CharSource > Loyc.Syntax.ISourceFile Loyc.Syntax.SourceFile< CharSource > Loyc.Syntax.EmptySourceFile Loyc.Syntax.Lexing.LexerSourceFile< CharSource > Loyc.Syntax.SourceFile< CharSource > Loyc.Syntax.SourceFileWithLineRemaps Loyc.Syntax.Lexing.LexerSourceFile< CharSource > Loyc.Syntax.Lexing.LexerSourceFile< CharSource >

Remarks

Contains LineToIndex methods.

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)
 

Additional Inherited Members

- Properties inherited from Loyc.Syntax.IFileName
string FileName [get]
 

Member Function Documentation

int Loyc.Syntax.ILineToIndex.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.