diff options
author | Linus Groh <mail@linusgroh.de> | 2020-12-28 21:02:56 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-29 15:42:30 +0100 |
commit | c39323401cd3cb90d516ddd7449a7f49be0c98ef (patch) | |
tree | 5f24af9d1fa1d98cd61ea521d3f8fe5f6d85827e | |
parent | d161007e9eb9bae014f5689744a52c7a459efad6 (diff) | |
download | serenity-c39323401cd3cb90d516ddd7449a7f49be0c98ef.zip |
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 }"!
-rw-r--r-- | Libraries/LibGUI/GMLParser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GMLParser.cpp b/Libraries/LibGUI/GMLParser.cpp index 67e7bc8099..bab0db544c 100644 --- a/Libraries/LibGUI/GMLParser.cpp +++ b/Libraries/LibGUI/GMLParser.cpp @@ -119,8 +119,10 @@ static Optional<JsonValue> parse_core_object(Queue<GMLToken>& tokens) value = parsed_value.release_value(); } object.set(property_name.m_view, move(value)); + } else if (peek() == GMLToken::Type::Comment) { + tokens.dequeue(); } else { - dbgln("Expected child, property, or }}"); + dbgln("Expected child, property, comment, or }}"); return {}; } } |