1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

LibIDL: Ignore leading underscores in IDL identifier names

According to the WebIDL specification, any leading underscores in
identifier names are ignored. A leading underscore is used when an
identifier would otherwise be a reserved word.
This commit is contained in:
Tim Ledbetter 2024-03-10 22:07:54 +00:00 committed by Andreas Kling
parent 130f28cf50
commit 9eaae99da7
2 changed files with 48 additions and 23 deletions

View file

@ -57,6 +57,10 @@ private:
Vector<Parameter> parse_parameters();
NonnullRefPtr<Type const> parse_type();
void parse_constant(Interface&);
ByteString parse_identifier_until(AK::Function<bool(char)> predicate);
ByteString parse_identifier_ending_with(auto... possible_terminating_characters);
ByteString parse_identifier_ending_with_space();
ByteString parse_identifier_ending_with_space_or(auto... possible_terminating_characters);
ByteString import_base_path;
ByteString filename;