1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:48:13 +00:00

LibIDL: Remove static maps for interfaces and resolved imports

Instead, create a tree of Parsers all pointing to a top-level Parser.

All module imports and interfaces are stored at the top level, instead
of in a static map. This allows creating multiple IDL::Parsers in the
same process without them stepping on each others toes.
This commit is contained in:
Andrew Kaster 2022-10-08 16:48:04 -06:00 committed by Andreas Kling
parent 2341294c20
commit 067a53b7e7
3 changed files with 49 additions and 14 deletions

View file

@ -71,7 +71,8 @@ int main(int argc, char** argv)
if (import_base_path.is_null())
import_base_path = lexical_path.dirname();
auto& interface = IDL::Parser(path, data, import_base_path).parse();
IDL::Parser parser(path, data, import_base_path);
auto& interface = parser.parse();
static constexpr Array libweb_interface_namespaces = {
"CSS"sv,