mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove constant keyword from parser.
This commit is contained in:
parent
09f3532ea9
commit
3984beef7d
@ -322,11 +322,18 @@ StateMutability Parser::parseStateMutability(Token::Value _token)
|
|||||||
StateMutability stateMutability(StateMutability::NonPayable);
|
StateMutability stateMutability(StateMutability::NonPayable);
|
||||||
if (_token == Token::Payable)
|
if (_token == Token::Payable)
|
||||||
stateMutability = StateMutability::Payable;
|
stateMutability = StateMutability::Payable;
|
||||||
// FIXME: constant should be removed at the next breaking release
|
else if (_token == Token::View)
|
||||||
else if (_token == Token::View || _token == Token::Constant)
|
|
||||||
stateMutability = StateMutability::View;
|
stateMutability = StateMutability::View;
|
||||||
else if (_token == Token::Pure)
|
else if (_token == Token::Pure)
|
||||||
stateMutability = StateMutability::Pure;
|
stateMutability = StateMutability::Pure;
|
||||||
|
else if (_token == Token::Constant)
|
||||||
|
{
|
||||||
|
stateMutability = StateMutability::View;
|
||||||
|
parserError(
|
||||||
|
"The state mutability modifier \"constant\" was removed in version 0.5.0. "
|
||||||
|
"Use \"view\" or \"pure\" instead."
|
||||||
|
);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
solAssert(false, "Invalid state mutability specifier.");
|
solAssert(false, "Invalid state mutability specifier.");
|
||||||
m_scanner->next();
|
m_scanner->next();
|
||||||
|
Loading…
Reference in New Issue
Block a user