mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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:
parent
36aac14798
commit
ae68355a56
Notes:
sideshowbarker
2024-07-17 19:08:12 +09:00
Author: https://github.com/itamar8910
Commit: ae68355a56
Pull-request: https://github.com/SerenityOS/serenity/pull/12335
Reviewed-by: https://github.com/guerinoni
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
Add a link
Reference in a new issue