mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
LibCpp: Accept scoped variable declarations
For instance, `Type Scope::Class::variable = value;` is a valid declaration.
This commit is contained in:
committed by
Andreas Kling
parent
b81926d933
commit
5d27740387
@@ -301,10 +301,10 @@ bool Parser::match_variable_declaration()
|
||||
parse_type(get_dummy_node());
|
||||
|
||||
// Identifier
|
||||
if (!peek(Token::Type::Identifier).has_value()) {
|
||||
if (!match_name())
|
||||
return false;
|
||||
}
|
||||
consume();
|
||||
|
||||
parse_name(get_dummy_node());
|
||||
|
||||
if (match(Token::Type::Equals)) {
|
||||
consume(Token::Type::Equals);
|
||||
|
||||
Reference in New Issue
Block a user