mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use only advance() and not with a mix of m_scanner->next()
This commit is contained in:
parent
98cc1d9994
commit
64c73baee9
@ -116,14 +116,14 @@ Statement Parser::parseStatement()
|
|||||||
{
|
{
|
||||||
Statement stmt{createWithLocation<Break>()};
|
Statement stmt{createWithLocation<Break>()};
|
||||||
checkBreakContinuePosition("break");
|
checkBreakContinuePosition("break");
|
||||||
m_scanner->next();
|
advance();
|
||||||
return stmt;
|
return stmt;
|
||||||
}
|
}
|
||||||
case Token::Continue:
|
case Token::Continue:
|
||||||
{
|
{
|
||||||
Statement stmt{createWithLocation<Continue>()};
|
Statement stmt{createWithLocation<Continue>()};
|
||||||
checkBreakContinuePosition("continue");
|
checkBreakContinuePosition("continue");
|
||||||
m_scanner->next();
|
advance();
|
||||||
return stmt;
|
return stmt;
|
||||||
}
|
}
|
||||||
case Token::Identifier:
|
case Token::Identifier:
|
||||||
@ -132,7 +132,7 @@ Statement Parser::parseStatement()
|
|||||||
Statement stmt{createWithLocation<Leave>()};
|
Statement stmt{createWithLocation<Leave>()};
|
||||||
if (!m_insideFunction)
|
if (!m_insideFunction)
|
||||||
m_errorReporter.syntaxError(8149_error, currentLocation(), "Keyword \"leave\" can only be used inside a function.");
|
m_errorReporter.syntaxError(8149_error, currentLocation(), "Keyword \"leave\" can only be used inside a function.");
|
||||||
m_scanner->next();
|
advance();
|
||||||
return stmt;
|
return stmt;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user