From 40c40b75519210649628e2a8d8abf05e22792f47 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Fri, 8 Apr 2022 17:41:34 +0300 Subject: 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. --- Userland/Libraries/LibGUI/GML/Parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGUI/GML/Parser.cpp b/Userland/Libraries/LibGUI/GML/Parser.cpp index e79eb39df0..8e6cfcd71b 100644 --- a/Userland/Libraries/LibGUI/GML/Parser.cpp +++ b/Userland/Libraries/LibGUI/GML/Parser.cpp @@ -57,14 +57,14 @@ static ErrorOr> parse_gml_object(Queue& 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(); -- cgit v1.2.3