mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00: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: c39323401c
Pull-request: https://github.com/SerenityOS/serenity/pull/4626
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/devsh0
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue