Skip to content

Commit c53ff4b

Browse files
make many keywords overridable
1 parent 6a7879d commit c53ff4b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

cppparser/src/parser.y

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,28 @@ int GetKeywordId(const std::string& keyword)
22532253
{"final", tknFinal},
22542254
{"override", tknOverride},
22552255
{"const", tknConst},
2256-
{"noexcept", tknNoExcept}};
2256+
{"noexcept", tknNoExcept},
2257+
{"inline", tknInline},
2258+
{"explicit", tknExplicit},
2259+
{"friend", tknFriend},
2260+
{"public", tknPublic},
2261+
{"protected", tknProtected},
2262+
{"private", tknPrivate},
2263+
{"struct", tknStruct},
2264+
{"class", tknClass},
2265+
{"union", tknUnion},
2266+
{"namespace", tknNamespace},
2267+
{"typename", tknTypename},
2268+
{"template", tknTemplate},
2269+
{"extern", tknExtern},
2270+
{"extern", tknExtern},
2271+
{"static", tknStatic},
2272+
{"auto", tknAuto},
2273+
{"mutable", tknMutable},
2274+
{"volatile", tknVolatile},
2275+
{"constexpr", tknConstExpr},
2276+
{"constexpr", tknConstExpr},
2277+
{"typedef", tknTypedef}};
22572278

22582279
auto itr = keywordToIdMap.find(keyword);
22592280
return (itr != keywordToIdMap.end()) ? itr->second : -1;

0 commit comments

Comments
 (0)