summaryrefslogtreecommitdiff
path: root/src/main/command_executor.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-11-11 07:44:25 -0600
committerGitHub <noreply@github.com>2020-11-11 07:44:25 -0600
commitc28f040e3b8c4aba150a61f0e42b1da7376b350e (patch)
tree8fe4bef06a9a88379ed3427caf51e91d49f8bf1f /src/main/command_executor.cpp
parent59d8647b04f86421949390a3e958ffdf0df07665 (diff)
Pass symbol manager to commands (#5410)
This PR passes the symbol manager to Command::invoke. There are no behavior changes in this PR. This is in preparation for reimplementing several features in the parser related to symbols.
Diffstat (limited to 'src/main/command_executor.cpp')
-rw-r--r--src/main/command_executor.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp
index a56210fb1..7b20f3a1a 100644
--- a/src/main/command_executor.cpp
+++ b/src/main/command_executor.cpp
@@ -119,9 +119,10 @@ bool CommandExecutor::doCommandSingleton(Command* cmd)
{
bool status = true;
if(d_options.getVerbosity() >= -1) {
- status = solverInvoke(d_solver.get(), cmd, d_options.getOut());
+ status =
+ solverInvoke(d_solver.get(), d_symman.get(), cmd, d_options.getOut());
} else {
- status = solverInvoke(d_solver.get(), cmd, nullptr);
+ status = solverInvoke(d_solver.get(), d_symman.get(), cmd, nullptr);
}
api::Result res;
@@ -198,15 +199,18 @@ bool CommandExecutor::doCommandSingleton(Command* cmd)
return status;
}
-bool solverInvoke(api::Solver* solver, Command* cmd, std::ostream* out)
+bool solverInvoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ Command* cmd,
+ std::ostream* out)
{
if (out == NULL)
{
- cmd->invoke(solver);
+ cmd->invoke(solver, sm);
}
else
{
- cmd->invoke(solver, *out);
+ cmd->invoke(solver, sm, *out);
}
// ignore the error if the command-verbosity is 0 for this command
std::string commandName =
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback