aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmAnalysis.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-01 20:16:01 +0800
committerchriseth <chris@ethereum.org>2017-06-01 20:28:39 +0800
commit05004253ba9f7bf5a3d71d8ed590367619ebbe4f (patch)
tree31e43abe776796e994a55c84ffecf41dbfc73af8 /libsolidity/inlineasm/AsmAnalysis.h
parentd4a57d81ba7f2a9b5db57397d36f1a17adb4b142 (diff)
downloaddexon-solidity-05004253ba9f7bf5a3d71d8ed590367619ebbe4f.tar.gz
dexon-solidity-05004253ba9f7bf5a3d71d8ed590367619ebbe4f.tar.zst
dexon-solidity-05004253ba9f7bf5a3d71d8ed590367619ebbe4f.zip
Refactor to use expectExpression in analyzer.
Diffstat (limited to 'libsolidity/inlineasm/AsmAnalysis.h')
-rw-r--r--libsolidity/inlineasm/AsmAnalysis.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmAnalysis.h b/libsolidity/inlineasm/AsmAnalysis.h
index 7e4d78df..e52e6302 100644
--- a/libsolidity/inlineasm/AsmAnalysis.h
+++ b/libsolidity/inlineasm/AsmAnalysis.h
@@ -47,6 +47,8 @@ struct StackAssignment;
struct FunctionDefinition;
struct FunctionCall;
struct Switch;
+using Statement = boost::variant<Instruction, Literal, Label, StackAssignment, Identifier, Assignment, FunctionCall, FunctionalInstruction, VariableDeclaration, FunctionDefinition, Switch, Block>;
+
struct Scope;
@@ -83,10 +85,13 @@ public:
bool operator()(assembly::Block const& _block);
private:
+ /// Visits the statement and expects it to deposit one item onto the stack.
+ bool expectExpression(Statement const& _statement);
+
/// Verifies that a variable to be assigned to exists and has the same size
/// as the value, @a _valueSize, unless that is equal to -1.
bool checkAssignment(assembly::Identifier const& _assignment, size_t _valueSize = size_t(-1));
- bool expectDeposit(int _deposit, int _oldHeight, SourceLocation const& _location);
+
Scope& scope(assembly::Block const* _block);
void expectValidType(std::string const& type, SourceLocation const& _location);