LibGUI: Consider comment tokens in GMLParser

It was just ignoring them, so any GML containing a comment would fail
to parse with "Expected child, property, or }"!
This commit is contained in:
Linus Groh 2020-12-28 21:02:56 +01:00 committed by Andreas Kling
parent d161007e9e
commit c39323401c
Notes: sideshowbarker 2024-07-19 00:26:50 +09:00

View File

@ -119,8 +119,10 @@ static Optional<JsonValue> parse_core_object(Queue<GMLToken>& tokens)
value = parsed_value.release_value(); value = parsed_value.release_value();
} }
object.set(property_name.m_view, move(value)); object.set(property_name.m_view, move(value));
} else if (peek() == GMLToken::Type::Comment) {
tokens.dequeue();
} else { } else {
dbgln("Expected child, property, or }}"); dbgln("Expected child, property, comment, or }}");
return {}; return {};
} }
} }