mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Skip whitespace when parsing IDL non-interface entities
This stops the WrapperGenerator freaking out when an IDL file starts with a comment or whitespace. :^)
This commit is contained in:
parent
d4c40e3aad
commit
abd359a921
Notes:
sideshowbarker
2024-07-17 20:33:50 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/abd359a921 Pull-request: https://github.com/SerenityOS/serenity/pull/14716 Reviewed-by: https://github.com/kennethmyhra Reviewed-by: https://github.com/linusg
1 changed files with 4 additions and 0 deletions
|
@ -761,6 +761,8 @@ void Parser::parse_callback_function(HashMap<String, String>& extended_attribute
|
|||
|
||||
void Parser::parse_non_interface_entities(bool allow_interface, Interface& interface)
|
||||
{
|
||||
consume_whitespace();
|
||||
|
||||
while (!lexer.is_eof()) {
|
||||
HashMap<String, String> extended_attributes;
|
||||
if (lexer.consume_specific('['))
|
||||
|
@ -794,6 +796,8 @@ void Parser::parse_non_interface_entities(bool allow_interface, Interface& inter
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
consume_whitespace();
|
||||
}
|
||||
|
||||
void resolve_typedef(Interface& interface, NonnullRefPtr<Type>& type, HashMap<String, String>* extended_attributes = {})
|
||||
|
|
Loading…
Reference in a new issue