aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-02-22 09:13:41 +0800
committerchriseth <c@ethdev.com>2016-03-30 08:37:00 +0800
commit949b00ed591303c531ed8fa73087b710b7a554de (patch)
tree182664f2545e6211d7994ef90a1e7746d5482981 /libsolidity/ast/AST.h
parent8236732e9a5d2535afd3a3573a70d5aab3da3efe (diff)
downloaddexon-solidity-949b00ed591303c531ed8fa73087b710b7a554de.tar.gz
dexon-solidity-949b00ed591303c531ed8fa73087b710b7a554de.tar.zst
dexon-solidity-949b00ed591303c531ed8fa73087b710b7a554de.zip
Parsing for inline assembly.
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index d32d76a4..f53c78f2 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -28,6 +28,7 @@
#include <memory>
#include <boost/noncopyable.hpp>
#include <libevmasm/SourceLocation.h>
+#include <libevmcore/Instruction.h>
#include <libsolidity/interface/Utils.h>
#include <libsolidity/ast/ASTForward.h>
#include <libsolidity/parsing/Token.h>
@@ -854,6 +855,30 @@ public:
virtual StatementAnnotation& annotation() const override;
};
+// Forward-declaration to InlineAssembly.h
+class AsmData;
+
+/**
+ * Inline assembly.
+ */
+class InlineAssembly: public Statement
+{
+public:
+ InlineAssembly(
+ SourceLocation const& _location,
+ ASTPointer<ASTString> const& _docString,
+ std::shared_ptr<AsmData> const& _operations
+ ):
+ Statement(_location, _docString), m_operations(_operations) {}
+ virtual void accept(ASTVisitor& _visitor) override;
+ virtual void accept(ASTConstVisitor& _visitor) const override;
+
+ AsmData const& operations() const { return *m_operations; }
+
+private:
+ std::shared_ptr<AsmData> m_operations;
+};
+
/**
* Brace-enclosed block containing zero or more statements.
*/