const String & File()
Return the filename associated with the current position.
bool LineBreak() const
Const version of LineBreak.
void AdvanceChar()
Advance position pointer by one character.
char Current()
Return the current character.
void AppendFile(const String &name)
Appends contents of file to the source text.
Index mColumn
Column position in the text.
A smart class to hold the text for parsing.
void Init()
This sets the pointer to the first existing character in the text.
void SetPosition(Index line, Index column)
Set current position.
friend std::ostream & operator<<(std::ostream &os, const SourceText &text)
Output operator for SourceText.
bool & LineBreak()
Read the line break flag.
Index mLine
Line position in the text.
bool mLineBreak
Is set to true if the last operation caused a line break.
bool reachedEot()
Check if the current position reached the end.
ArrayOfIndex mSfLine
Remember where which source file starts.
void AdvanceLine()
Advances position pointer by one line.
Index Column()
Return the current column.
Index Line()
Return the line number, but for the file that is associated with the current position.