Enhanced C#
Language of your choice: library documentation
Properties | Public Member Functions | List of all members
Loyc.Syntax.IIndexToLine Interface Reference

Contains IndexToLine method. More...


Source file:
Inheritance diagram for Loyc.Syntax.IIndexToLine:
Loyc.Syntax.IIndexPositionMapper Loyc.Syntax.Lexing.BaseLexer< CharSrc > Loyc.Syntax.Lexing.ILexer< Token > Loyc.Syntax.IndexPositionMapper< CharSource > Loyc.Syntax.ISourceFile Loyc.Ecs.Parser.EcsLexer Loyc.Syntax.Lexing.BaseILexer< CharSrc, Token > Loyc.Syntax.Lexing.LexerSourceWorkaround< CharSrc > Loyc.Ecs.Parser.EcsLexer Loyc.Syntax.Les.Les2Lexer Loyc.Syntax.Les.Les3Lexer Loyc.Syntax.Lexing.BaseILexer< CharSrc, Token > Loyc.Syntax.Lexing.LexerWrapper< Token > Loyc.Syntax.Lexing.TokenListAsLexer

Remarks

Contains IndexToLine method.

See also
IIndexPositionMapper

Properties

string FileName [get]
 Gets the file name used in results returned by IndexToLine(int). More...
 

Public Member Functions

SourcePos IndexToLine (int index)
 Returns the position in a source file of the specified index. More...
 

Member Function Documentation

SourcePos Loyc.Syntax.IIndexToLine.IndexToLine ( int  index)

Returns the position in a source file of the specified index.

If index is negative, this should return a SourcePos where Line and PosInLine are zero (signifying an unknown location). If index is beyond the end of the file, this should retun the final position in the file.

Implemented in Loyc.Syntax.Lexing.BaseLexer< CharSrc >, Loyc.Syntax.IndexPositionMapper< CharSource >, Loyc.Syntax.Lexing.LexerWrapper< Token >, Loyc.Syntax.Lexing.TokenListAsLexer, Loyc.Syntax.SourceFileWithLineRemaps, and Loyc.Syntax.EmptySourceFile.

Referenced by Loyc.Syntax.Lexing.TokenListAsLexer.NextToken().

Property Documentation

string Loyc.Syntax.IIndexToLine.FileName
get

Gets the file name used in results returned by IndexToLine(int).

It is not guaranteed that all return values from IndexToLine(int) use this filename; for example, the file may vary in mappings from SourceFileWithLineRemaps.