mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
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:
parent
d161007e9e
commit
c39323401c
Notes:
sideshowbarker
2024-07-19 00:26:50 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/c39323401cd Pull-request: https://github.com/SerenityOS/serenity/pull/4626 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/devsh0
@ -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 {};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user