mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00:00
LibGUI: Allow comment(s) before first class marker in GML parser
This wasn't considered valid GML but now is: // This is a comment // This as well @Foo::Bar {}
This commit is contained in:
parent
747e8de96a
commit
acdbf66b54
Notes:
sideshowbarker
2024-07-19 00:09:01 +09:00
Author: https://github.com/linusg
Commit: acdbf66b54
Pull-request: https://github.com/SerenityOS/serenity/pull/4773
Reviewed-by: https://github.com/alimpfard
1 changed files with 3 additions and 0 deletions
|
@ -45,6 +45,9 @@ static Optional<JsonValue> parse_core_object(Queue<GMLToken>& tokens)
|
|||
return tokens.head().m_type;
|
||||
};
|
||||
|
||||
while (peek() == GMLToken::Type::Comment)
|
||||
tokens.dequeue();
|
||||
|
||||
if (peek() != GMLToken::Type::ClassMarker) {
|
||||
dbgln("Expected class marker");
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue