If all sources are considered deffered enter interactive mode

This commit is contained in:
Robert Bendun 2022-10-20 16:46:52 +02:00
parent 6c631dc075
commit 2a3bfa14ae

View File

@ -445,6 +445,11 @@ static std::optional<Error> Main(std::span<char const*> args)
}
}
enable_repl = enable_repl || std::all_of(runnables.begin(), runnables.end(),
[](Run const& run) {
return run.type == Run::Deffered_File;
});
if (runnables.empty() || enable_repl) {
repl_line_number = 1;
enable_repl = true;