diff options
author | chriseth <chris@ethereum.org> | 2017-06-19 17:53:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 17:53:22 +0800 |
commit | 0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf (patch) | |
tree | 49cfc2be091c868bdc5865a9d718ea33b1a1269e /libsolidity/inlineasm/AsmData.h | |
parent | e0b9589e5a5b961541aefe783045b93fac347773 (diff) | |
parent | c5339037e9c1d25c95093f905ebe443a38d419f0 (diff) | |
download | dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.gz dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.bz2 dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.lz dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.xz dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.tar.zst dexon-solidity-0c75afb2c1b9c8e81295c76aa1caa2a48b239aaf.zip |
Merge pull request #2225 from ethereum/julia-for
Implement for statement in assembly parser / printer / code generator
Diffstat (limited to 'libsolidity/inlineasm/AsmData.h')
-rw-r--r-- | libsolidity/inlineasm/AsmData.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/libsolidity/inlineasm/AsmData.h b/libsolidity/inlineasm/AsmData.h index 72afeef1..db5840bc 100644 --- a/libsolidity/inlineasm/AsmData.h +++ b/libsolidity/inlineasm/AsmData.h @@ -22,10 +22,13 @@ #pragma once -#include <boost/variant.hpp> +#include <libsolidity/inlineasm/AsmDataForward.h> + #include <libevmasm/Instruction.h> #include <libevmasm/SourceLocation.h> +#include <boost/variant.hpp> + namespace dev { namespace solidity @@ -38,23 +41,6 @@ using Type = std::string; struct TypedName { SourceLocation location; std::string name; Type type; }; using TypedNameList = std::vector<TypedName>; -/// What follows are the AST nodes for assembly. - -struct Instruction; -struct Literal; -struct Label; -struct StackAssignment; -struct Identifier; -struct Assignment; -struct VariableDeclaration; -struct FunctionalInstruction; -struct FunctionDefinition; -struct FunctionCall; -struct Switch; -struct Block; - -using Statement = boost::variant<Instruction, Literal, Label, StackAssignment, Identifier, Assignment, FunctionCall, FunctionalInstruction, VariableDeclaration, FunctionDefinition, Switch, Block>; - /// Direct EVM instruction (except PUSHi and JUMPDEST) struct Instruction { SourceLocation location; solidity::Instruction instruction; }; /// Literal number or string (up to 32 bytes) @@ -82,6 +68,7 @@ struct FunctionDefinition { SourceLocation location; std::string name; TypedName struct Case { SourceLocation location; std::shared_ptr<Literal> value; Block body; }; /// Switch statement struct Switch { SourceLocation location; std::shared_ptr<Statement> expression; std::vector<Case> cases; }; +struct ForLoop { SourceLocation location; Block pre; std::shared_ptr<Statement> condition; Block post; Block body; }; struct LocationExtractor: boost::static_visitor<SourceLocation> { |