mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibGUI: Insert parsed comments in parsing order
We were accidentally reversing the order of consecutive comments when inserting them as children of the GML object.
This commit is contained in:
parent
c56bc49b70
commit
40c40b7551
Notes:
sideshowbarker
2024-07-17 14:16:28 +09:00
Author: https://github.com/IdanHo
Commit: 40c40b7551
Pull-request: https://github.com/SerenityOS/serenity/pull/13572
Issue: https://github.com/SerenityOS/serenity/issues/13113
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 2 additions and 2 deletions
|
@ -57,14 +57,14 @@ static ErrorOr<NonnullRefPtr<Object>> parse_gml_object(Queue<Token>& tokens)
|
|||
// It's a child object.
|
||||
|
||||
while (!pending_comments.is_empty())
|
||||
TRY(object->add_sub_object_child(pending_comments.take_last()));
|
||||
TRY(object->add_sub_object_child(pending_comments.take_first()));
|
||||
|
||||
TRY(object->add_sub_object_child(TRY(parse_gml_object(tokens))));
|
||||
} else if (peek() == Token::Type::Identifier) {
|
||||
// It's a property.
|
||||
|
||||
while (!pending_comments.is_empty())
|
||||
TRY(object->add_property_child(pending_comments.take_last()));
|
||||
TRY(object->add_property_child(pending_comments.take_first()));
|
||||
|
||||
auto property_name = tokens.dequeue();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue