Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Properties | Public Member Functions | Protected fields | List of all members
Loyc.Syntax.SourceFile< CharSource > Class Template Reference

A default implementation of ISourceFile based on IndexPositionMapper. More...


Source file:
Inheritance diagram for Loyc.Syntax.SourceFile< CharSource >:
Loyc.Syntax.IndexPositionMapper< CharSource > Loyc.Syntax.ISourceFile Loyc.Syntax.IIndexPositionMapper Loyc.Syntax.IIndexPositionMapper Loyc.Syntax.IIndexToLine Loyc.Syntax.IIndexToLine Loyc.Syntax.Lexing.LexerSourceFile< CharSource >

Remarks

A default implementation of ISourceFile based on IndexPositionMapper.

Type Constraints
CharSource :ICharSource 

Properties

CharSource Text [get]
 
- Properties inherited from Loyc.Syntax.IndexPositionMapper< CharSource >
string FileName [get]
 
int LineCount [get]
 
- Properties inherited from Loyc.Syntax.ISourceFile
ICharSource Text [get]
 
string FileName [get]
 

Public Member Functions

 SourceFile (CharSource source, SourcePos startingPos=null)
 
 SourceFile (CharSource source, string fileName)
 
- Public Member Functions inherited from Loyc.Syntax.IndexPositionMapper< CharSource >
 IndexPositionMapper (CharSource source, SourcePos startingPos=null)
 Initializes CharIndexPositionMapper. More...
 
 IndexPositionMapper (CharSource source, string fileName)
 
SourcePos IndexToLine (int index)
 Returns the position in a source file of the specified index. More...
 
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 (LineAndCol pos)
 

Protected fields

new CharSource _source
 
- Protected fields inherited from Loyc.Syntax.IndexPositionMapper< CharSource >
CharSource _source
 
InternalList< int > _lineOffsets = InternalList<int>.Empty
 
bool _offsetsComplete = false
 
SourcePos _startingPos = null
 

Additional Inherited Members

- Protected Member Functions inherited from Loyc.Syntax.IndexPositionMapper< CharSource >
void Reset (CharSource source, string fileName)
 Reinitializes the object (as though the constructor were called again). More...
 
void Reset (CharSource source, SourcePos startingPos=null)
 
SourcePos NewSourcePos (int Line, int PosInLine)
 
void ReadUntilAfter (int toIndex)
 
bool AdvanceAfterNextNewline (ref int index)