mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make `abstract` keyword instead of reserved
This commit is contained in:
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_SUITE(SolidityParser)
|
||||
BOOST_AUTO_TEST_CASE(reserved_keywords)
|
||||
{
|
||||
BOOST_CHECK(!TokenTraits::isReservedKeyword(Token::Identifier));
|
||||
BOOST_CHECK(TokenTraits::isReservedKeyword(Token::Abstract));
|
||||
BOOST_CHECK(TokenTraits::isReservedKeyword(Token::After));
|
||||
BOOST_CHECK(TokenTraits::isReservedKeyword(Token::Unchecked));
|
||||
BOOST_CHECK(!TokenTraits::isReservedKeyword(Token::Illegal));
|
||||
}
|
||||
@@ -532,7 +532,6 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers)
|
||||
BOOST_AUTO_TEST_CASE(keyword_is_reserved)
|
||||
{
|
||||
auto keywords = {
|
||||
"abstract",
|
||||
"after",
|
||||
"alias",
|
||||
"apply",
|
||||
@@ -568,6 +567,8 @@ BOOST_AUTO_TEST_CASE(keyword_is_reserved)
|
||||
"unchecked"
|
||||
};
|
||||
|
||||
BOOST_CHECK_EQUAL(std::size(keywords), static_cast<int>(Token::Unchecked) - static_cast<int>(Token::After) + 1);
|
||||
|
||||
for (auto const& keyword: keywords)
|
||||
{
|
||||
auto text = std::string("contract ") + keyword + " {}";
|
||||
|
||||
Reference in New Issue
Block a user