mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 11:06:10 +00:00
LibCpp: Parse "extern" declarations
Note that this is not the `extern "C"` declarations, just extern decl qualifiers.
This commit is contained in:
parent
5d27740387
commit
67a19eaecb
Notes:
sideshowbarker
2024-07-18 07:36:47 +09:00
Author: https://github.com/alimpfard
Commit: 67a19eaecb
Pull-request: https://github.com/SerenityOS/serenity/pull/9156
Reviewed-by: https://github.com/itamar8910 ✅
1 changed files with 2 additions and 2 deletions
|
@ -1261,7 +1261,7 @@ Vector<StringView> Parser::parse_type_qualifiers()
|
|||
if (token.type() != Token::Type::Keyword)
|
||||
break;
|
||||
auto text = text_of_token(token);
|
||||
if (text == "static" || text == "const") {
|
||||
if (text == "static" || text == "const" || text == "extern") {
|
||||
qualifiers.append(text);
|
||||
consume();
|
||||
} else {
|
||||
|
@ -1280,7 +1280,7 @@ Vector<StringView> Parser::parse_function_qualifiers()
|
|||
if (token.type() != Token::Type::Keyword)
|
||||
break;
|
||||
auto text = text_of_token(token);
|
||||
if (text == "static" || text == "inline") {
|
||||
if (text == "static" || text == "inline" || text == "extern") {
|
||||
qualifiers.append(text);
|
||||
consume();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue