Merge pull request #5990 from ethereum/provideAccessToAssmeblyAST

Provide access to assembly ast
This commit is contained in:
chriseth
2019-02-13 17:38:22 +01:00
committed by GitHub
4 changed files with 30 additions and 52 deletions
+8
View File
@@ -178,3 +178,11 @@ string AssemblyStack::print() const
solAssert(m_parserResult->code, "");
return m_parserResult->toString(m_language == Language::Yul) + "\n";
}
shared_ptr<Object> AssemblyStack::parserResult() const
{
solAssert(m_analysisSuccessful, "Analysis was not successful.");
solAssert(m_parserResult, "");
solAssert(m_parserResult->code, "");
return m_parserResult;
}
+3
View File
@@ -82,6 +82,9 @@ public:
/// Pretty-print the input after having parsed it.
std::string print() const;
/// Return the parsed and analyzed object.
std::shared_ptr<Object> parserResult() const;
private:
bool analyzeParsed();
bool analyzeParsed(yul::Object& _object);