Make `abstract` keyword instead of reserved

This commit is contained in:
Mathias Baumann
2019-11-14 11:49:39 +01:00
parent 5b8ff78176
commit caa127e2a8
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -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 + " {}";