mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibIDL+LibWeb: Begin supporting the LegacyNamespace extended attribute
This is used by WebAssembly IDL files. For now, we mostly use this for error messages and cache keys (to ensure compatibility with existing code as WebAssembly is ported to IDL).
This commit is contained in:
parent
1ff75618c0
commit
af119d92cb
Notes:
sideshowbarker
2024-07-16 23:05:02 +09:00
Author: https://github.com/trflynn89
Commit: af119d92cb
Pull-request: https://github.com/SerenityOS/serenity/pull/17878
Reviewed-by: https://github.com/alimpfard ✅
4 changed files with 16 additions and 8 deletions
|
@ -592,6 +592,11 @@ void Parser::parse_interface(Interface& interface)
|
|||
parse_function(extended_attributes, interface);
|
||||
}
|
||||
|
||||
if (auto legacy_namespace = interface.extended_attributes.get("LegacyNamespace"sv); legacy_namespace.has_value())
|
||||
interface.namespaced_name = DeprecatedString::formatted("{}.{}", *legacy_namespace, interface.name);
|
||||
else
|
||||
interface.namespaced_name = interface.name;
|
||||
|
||||
interface.constructor_class = DeprecatedString::formatted("{}Constructor", interface.name);
|
||||
interface.prototype_class = DeprecatedString::formatted("{}Prototype", interface.name);
|
||||
interface.prototype_base_class = DeprecatedString::formatted("{}Prototype", interface.parent_name.is_empty() ? "Object" : interface.parent_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue