mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow running Eldarica from the command line
This commit is contained in:
@@ -653,7 +653,7 @@ void CommandLineInterface::processInput()
|
||||
{
|
||||
solAssert(m_standardJsonInput.has_value());
|
||||
|
||||
StandardCompiler compiler(m_fileReader.reader(), m_options.formatting.json);
|
||||
StandardCompiler compiler(m_universalCallback.callback(), m_options.formatting.json);
|
||||
sout() << compiler.compile(std::move(m_standardJsonInput.value())) << endl;
|
||||
m_standardJsonInput.reset();
|
||||
break;
|
||||
@@ -692,7 +692,7 @@ void CommandLineInterface::compile()
|
||||
{
|
||||
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
|
||||
|
||||
m_compiler = make_unique<CompilerStack>(m_fileReader.reader());
|
||||
m_compiler = make_unique<CompilerStack>(m_universalCallback.callback());
|
||||
|
||||
SourceReferenceFormatter formatter(serr(false), *m_compiler, coloredOutput(m_options), m_options.formatting.withErrorIds);
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <libsolidity/interface/CompilerStack.h>
|
||||
#include <libsolidity/interface/DebugSettings.h>
|
||||
#include <libsolidity/interface/FileReader.h>
|
||||
#include <libsolidity/interface/UniversalCallback.h>
|
||||
#include <libsolidity/interface/SMTSolverCommand.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <iostream>
|
||||
@@ -138,6 +140,8 @@ private:
|
||||
std::ostream& m_serr;
|
||||
bool m_hasOutput = false;
|
||||
FileReader m_fileReader;
|
||||
SMTSolverCommand m_solverCommand{"eld"};
|
||||
UniversalCallback m_universalCallback{m_fileReader, m_solverCommand};
|
||||
std::optional<std::string> m_standardJsonInput;
|
||||
std::unique_ptr<frontend::CompilerStack> m_compiler;
|
||||
CommandLineOptions m_options;
|
||||
|
||||
@@ -828,7 +828,7 @@ General Information)").c_str(),
|
||||
)
|
||||
(
|
||||
g_strModelCheckerSolvers.c_str(),
|
||||
po::value<string>()->value_name("all,cvc4,z3,smtlib2")->default_value("all"),
|
||||
po::value<string>()->value_name("cvc4,eld,z3,smtlib2")->default_value("z3"),
|
||||
"Select model checker solvers."
|
||||
)
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user