1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

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
parent ee3ac88c2d
commit e23b9907e7

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