mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LanguageServers/Cpp: Refactor logic of find declaration
This commit is contained in:
parent
e16036b9cc
commit
510b5073de
Notes:
sideshowbarker
2024-07-18 20:41:10 +09:00
Author: https://github.com/itamar8910
Commit: 510b5073de
Pull-request: https://github.com/SerenityOS/serenity/pull/6009
2 changed files with 59 additions and 12 deletions
|
@ -590,7 +590,8 @@ NonnullRefPtr<Expression> Parser::parse_secondary_expression(ASTNode& parent, No
|
|||
auto exp = create_ast_node<MemberExpression>(parent, lhs->start(), {});
|
||||
lhs->set_parent(*exp);
|
||||
exp->m_object = move(lhs);
|
||||
exp->m_property = parse_expression(*exp);
|
||||
auto identifier_token = consume(Token::Type::Identifier);
|
||||
exp->m_property = create_ast_node<Identifier>(*exp, identifier_token.start(), identifier_token.end(), identifier_token.text());
|
||||
exp->set_end(position());
|
||||
return exp;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue