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
commit 067a53b7e7
Notes: sideshowbarker 2024-07-18 22:57:59 +09:00
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,