diff options
Diffstat (limited to 'libsolidity/interface/AssemblyStack.cpp')
-rw-r--r-- | libsolidity/interface/AssemblyStack.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libsolidity/interface/AssemblyStack.cpp b/libsolidity/interface/AssemblyStack.cpp index dc9d7db2..a571a008 100644 --- a/libsolidity/interface/AssemblyStack.cpp +++ b/libsolidity/interface/AssemblyStack.cpp @@ -57,6 +57,20 @@ bool AssemblyStack::parseAndAnalyze(std::string const& _sourceName, std::string return m_analysisSuccessful; } +bool AssemblyStack::analyze(assembly::Block const& _block, Scanner const* _scanner) +{ + m_errors.clear(); + m_analysisSuccessful = false; + if (_scanner) + m_scanner = make_shared<Scanner>(*_scanner); + m_parserResult = make_shared<assembly::Block>(_block); + + m_analysisInfo = make_shared<assembly::AsmAnalysisInfo>(); + assembly::AsmAnalyzer analyzer(*m_analysisInfo, m_errorReporter); + m_analysisSuccessful = analyzer.analyze(*m_parserResult); + return m_analysisSuccessful; +} + eth::LinkerObject AssemblyStack::assemble(Machine _machine) { solAssert(m_analysisSuccessful, ""); |