mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibCpp: Allow 'override' as a function target qualifier
This is just ignored right now.
This commit is contained in:
parent
5f66874ea0
commit
e27ec04cdd
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ NonnullRefPtr<FunctionDeclaration> Parser::parse_function_declaration(ASTNode& p
|
||||||
|
|
||||||
consume(Token::Type::RightParen);
|
consume(Token::Type::RightParen);
|
||||||
|
|
||||||
if (match_keyword("const")) {
|
while (match_keyword("const") || match_keyword("override")) {
|
||||||
consume();
|
consume();
|
||||||
// FIXME: Note that this function is supposed to be a class member, and `this` has to be const, somehow.
|
// FIXME: Note that this function is supposed to be a class member, and `this` has to be const, somehow.
|
||||||
}
|
}
|
||||||
|
@ -744,7 +744,7 @@ bool Parser::match_function_declaration()
|
||||||
|
|
||||||
while (consume().type() != Token::Type::RightParen && !eof()) { };
|
while (consume().type() != Token::Type::RightParen && !eof()) { };
|
||||||
|
|
||||||
if (match_keyword("const"))
|
while (match_keyword("const") || match_keyword("override"))
|
||||||
consume();
|
consume();
|
||||||
|
|
||||||
if (peek(Token::Type::Semicolon).has_value() || peek(Token::Type::LeftCurly).has_value())
|
if (peek(Token::Type::Semicolon).has_value() || peek(Token::Type::LeftCurly).has_value())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue