Parse for statement in assembly parser / printer

This commit is contained in:
Alex Beregszaszi
2017-06-16 10:56:21 +01:00
parent 54e97d1c34
commit 47925bc14e
13 changed files with 75 additions and 18 deletions
@@ -53,6 +53,11 @@ void CodeTransform::run(Block const& _block)
}
void CodeTransform::operator()(ForLoop const&)
{
solAssert(false, "For loop not removed during desugaring phase.");
}
void CodeTransform::operator()(VariableDeclaration const& _varDecl)
{
solAssert(m_scope, "");
+1 -15
View File
@@ -32,21 +32,6 @@ namespace solidity
class ErrorReporter;
namespace assembly
{
struct Literal;
struct Block;
struct Switch;
struct Label;
struct FunctionalInstruction;
struct Assignment;
struct VariableDeclaration;
struct Instruction;
struct Identifier;
struct StackAssignment;
struct FunctionDefinition;
struct FunctionCall;
using Statement = boost::variant<Instruction, Literal, Label, StackAssignment, Identifier, Assignment, FunctionCall, FunctionalInstruction, VariableDeclaration, FunctionDefinition, Switch, Block>;
struct AsmAnalysisInfo;
}
}
@@ -115,6 +100,7 @@ public:
void operator()(solidity::assembly::VariableDeclaration const& _varDecl);
void operator()(solidity::assembly::Switch const& _switch);
void operator()(solidity::assembly::FunctionDefinition const&);
void operator()(solidity::assembly::ForLoop const&);
void operator()(solidity::assembly::Block const& _block);
private: