1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 10:05:10 +00:00

JSSpecCompiler: Make -xspec capable of parsing the whole specification

... in theory. In practice, we fail to parse all of the functions.
This commit is contained in:
Dan Klishch 2024-01-18 21:17:26 -05:00 committed by Andrew Kaster
parent 483e195e48
commit 14ee25b8ba
9 changed files with 255 additions and 58 deletions

View file

@ -161,7 +161,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
outln(stderr, "{}", function->m_ast);
}
}
if (step.dump_cfg && translation_unit.functions_to_compile()[0]->m_cfg != nullptr) {
if (step.dump_cfg && translation_unit.functions_to_compile().size() && translation_unit.functions_to_compile()[0]->m_cfg != nullptr) {
outln(stderr, "===== CFG after {} =====", step.step->name());
for (auto const& function : translation_unit.functions_to_compile()) {
outln(stderr, "{}({}):", function->m_name, function->m_arguments);