mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename m_line to m_source
This commit is contained in:
parent
2169880d85
commit
d82adccc8f
@ -42,7 +42,7 @@ using Token = soltest::Token;
|
||||
|
||||
char TestFileParser::Scanner::peek() const noexcept
|
||||
{
|
||||
if (std::distance(m_char, m_line.end()) < 2)
|
||||
if (std::distance(m_char, m_source.end()) < 2)
|
||||
return '\0';
|
||||
|
||||
auto next = m_char;
|
||||
|
||||
@ -73,9 +73,9 @@ private:
|
||||
/// Constructor that takes an input stream \param _stream to operate on.
|
||||
/// It reads all lines into one single line, keeping the newlines.
|
||||
Scanner(std::istream& _stream):
|
||||
m_line(readStream(_stream))
|
||||
m_source(readStream(_stream))
|
||||
{
|
||||
m_char = m_line.begin();
|
||||
m_char = m_source.begin();
|
||||
}
|
||||
|
||||
/// Reads character stream and creates token.
|
||||
@ -95,14 +95,14 @@ private:
|
||||
/// Advances current position in the input stream.
|
||||
void advance(unsigned n = 1)
|
||||
{
|
||||
solAssert(m_char != m_line.end(), "Cannot advance beyond end.");
|
||||
solAssert(m_char != m_source.end(), "Cannot advance beyond end.");
|
||||
m_char = std::next(m_char, n);
|
||||
}
|
||||
|
||||
/// Returns the current character or '\0' if at end of input.
|
||||
char current() const noexcept
|
||||
{
|
||||
if (m_char == m_line.end())
|
||||
if (m_char == m_source.end())
|
||||
return '\0';
|
||||
|
||||
return *m_char;
|
||||
@ -113,9 +113,9 @@ private:
|
||||
char peek() const noexcept;
|
||||
|
||||
/// Returns true if the end of a line is reached, false otherwise.
|
||||
bool isEndOfLine() const { return m_char == m_line.end(); }
|
||||
bool isEndOfLine() const { return m_char == m_source.end(); }
|
||||
|
||||
std::string m_line;
|
||||
std::string m_source;
|
||||
std::string::const_iterator m_char;
|
||||
|
||||
std::string m_currentLiteral;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user