mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Refactor AssemblyStack
This commit is contained in:
parent
502304f30b
commit
aa310f9fec
@ -51,10 +51,7 @@ bool AssemblyStack::parseAndAnalyze(std::string const& _sourceName, std::string
|
||||
return false;
|
||||
solAssert(m_parserResult, "");
|
||||
|
||||
m_analysisInfo = make_shared<assembly::AsmAnalysisInfo>();
|
||||
assembly::AsmAnalyzer analyzer(*m_analysisInfo, m_errorReporter);
|
||||
m_analysisSuccessful = analyzer.analyze(*m_parserResult);
|
||||
return m_analysisSuccessful;
|
||||
return analyzeParsed();
|
||||
}
|
||||
|
||||
bool AssemblyStack::analyze(assembly::Block const& _block, Scanner const* _scanner)
|
||||
@ -65,6 +62,11 @@ bool AssemblyStack::analyze(assembly::Block const& _block, Scanner const* _scann
|
||||
m_scanner = make_shared<Scanner>(*_scanner);
|
||||
m_parserResult = make_shared<assembly::Block>(_block);
|
||||
|
||||
return analyzeParsed();
|
||||
}
|
||||
|
||||
bool AssemblyStack::analyzeParsed()
|
||||
{
|
||||
m_analysisInfo = make_shared<assembly::AsmAnalysisInfo>();
|
||||
assembly::AsmAnalyzer analyzer(*m_analysisInfo, m_errorReporter);
|
||||
m_analysisSuccessful = analyzer.analyze(*m_parserResult);
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
std::string print();
|
||||
|
||||
private:
|
||||
bool analyzeParsed();
|
||||
|
||||
Language m_language = Language::Assembly;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user