ADd back eof()

This commit is contained in:
Alex Beregszaszi 2021-05-13 19:54:34 +01:00
parent 246e157cda
commit 22cf48b880
2 changed files with 4 additions and 1 deletions

View File

@ -577,7 +577,7 @@ void TestFileParser::Scanner::scanNextToken()
}
else if (langutil::isWhiteSpace(current()))
selectToken(Token::Whitespace);
else if (isEndOfLine())
else if (eof())
{
m_currentToken = Token::EOS;
m_currentLiteral = "";

View File

@ -112,6 +112,9 @@ private:
/// without advancing the input stream iterator.
char peek() const noexcept;
/// Returns true if the end of a line is reached, false otherwise.
bool eof() const { return m_char == m_source.end(); }
std::string m_source;
std::string::const_iterator m_char;