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

This simplifies GML syntax when the object doesn't have
any childs or properties
This commit is contained in:
Edgar Araújo 2021-03-21 19:13:41 +00:00 committed by Andreas Kling
commit e23b9907e7
Notes: sideshowbarker 2024-07-18 20:59:11 +09:00

View file

@ -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();