mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05: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:
parent
36aac14798
commit
ae68355a56
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue