Provide access to AssemblyStack's AST.

This commit is contained in:
chriseth
2019-02-13 14:19:56 +01:00
parent 10888b21d8
commit a344381d5e
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);