mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibCpp: Fix parent of parameter type node
Previously, the parent of a parameter's Type node was incorrectly set to the parent of the Parameter node. We now set the parent of the parameter's Type node to the Parameter node itself.
This commit is contained in:
@@ -769,6 +769,7 @@ Optional<NonnullRefPtrVector<Parameter>> Parser::parse_parameter_list(ASTNode& p
|
||||
name = text_of_token(name_identifier.value());
|
||||
|
||||
auto param = create_ast_node<Parameter>(parent, type->start(), name_identifier.has_value() ? name_identifier.value().end() : type->end(), name);
|
||||
type->set_parent(*param.ptr());
|
||||
|
||||
param->set_type(move(type));
|
||||
parameters.append(move(param));
|
||||
|
||||
Reference in New Issue
Block a user