Pārlūkot izejas kodu

LibGUI: Remove the necessity to have empty {} on GML objects

This simplifies GML syntax when the object doesn't have
any childs or properties
Edgar Araújo 4 gadi atpakaļ
vecāks
revīzija
e23b9907e7
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      Userland/Libraries/LibGUI/GMLParser.cpp

+ 2 - 2
Userland/Libraries/LibGUI/GMLParser.cpp

@@ -64,8 +64,8 @@ static Optional<JsonValue> parse_core_object(Queue<GMLToken>& tokens)
     object.set("class", JsonValue(class_name.m_view));
 
     if (peek() != GMLToken::Type::LeftCurly) {
-        dbgln("Expected {{");
-        return {};
+        // Empty object
+        return object;
     }
     tokens.dequeue();