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

Contains an IndexToLine method. More...


Source file:
Inheritance diagram for Loyc.Syntax.IIndexToLine:
Loyc.Syntax.IFileName Loyc.Syntax.IIndexPositionMapper Loyc.Syntax.Lexing.BaseLexer< CharSrc > Loyc.Syntax.Lexing.ILexer< Token > Loyc.Syntax.IndexPositionMapper< CharSource > Loyc.Syntax.ISourceFile Loyc.Syntax.Lexing.BaseILexer< CharSrc, Token > Loyc.Syntax.Lexing.BaseLexer< CharSrc >.SavePosition 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 an IndexToLine method.

The FileName property gets the name of the file on which results returned by IndexToLine(int) are based. It is not guaranteed that all return values from IndexToLine(int) use this filename. For example, the file may have mappings to other files; see SourceFileWithLineRemaps.

Public Member Functions

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

Additional Inherited Members

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

Member Function Documentation

ILineColumnFile 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.