aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/optimiser/ASTCopier.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-11-28 22:00:23 +0800
committerchriseth <chris@ethereum.org>2017-12-05 19:09:55 +0800
commit30d7afc2e3fd27333e463a9127011ec1f7470d3e (patch)
tree8ce2d4115ec56f61770f8dfea3383a437e89c010 /libjulia/optimiser/ASTCopier.h
parentcba58629d24404ed7553d16bb2ad064f95f9fe37 (diff)
downloaddexon-solidity-30d7afc2e3fd27333e463a9127011ec1f7470d3e.tar.gz
dexon-solidity-30d7afc2e3fd27333e463a9127011ec1f7470d3e.tar.zst
dexon-solidity-30d7afc2e3fd27333e463a9127011ec1f7470d3e.zip
Simplify disambiguator.
Diffstat (limited to 'libjulia/optimiser/ASTCopier.h')
-rw-r--r--libjulia/optimiser/ASTCopier.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/libjulia/optimiser/ASTCopier.h b/libjulia/optimiser/ASTCopier.h
index 759dce31..0658fd50 100644
--- a/libjulia/optimiser/ASTCopier.h
+++ b/libjulia/optimiser/ASTCopier.h
@@ -27,6 +27,7 @@
#include <vector>
#include <set>
+#include <memory>
namespace dev
{
@@ -40,13 +41,6 @@ namespace julia
class ASTCopier: public boost::static_visitor<Statement>
{
public:
- ASTCopier(Block const& _block):
- m_block(_block)
- {}
-
- std::shared_ptr<Block> run();
-
-public:
Statement operator()(Literal const& _literal);
Statement operator()(Instruction const& _instruction);
Statement operator()(Identifier const& _identifier);
@@ -78,13 +72,11 @@ protected:
Literal translate(Literal const& _literal);
TypedName translate(TypedName const& _typedName);
- virtual void enterScope(Block const& _block) = 0;
- virtual void leaveScope(Block const& _block) = 0;
- virtual void enterFunction(FunctionDefinition const& _function) = 0;
- virtual void leaveFunction(FunctionDefinition const& _function) = 0;
+ virtual void enterScope(Block const&) { }
+ virtual void leaveScope(Block const&) { }
+ virtual void enterFunction(FunctionDefinition const&) { }
+ virtual void leaveFunction(FunctionDefinition const&) { }
virtual std::string translateIdentifier(std::string const& _name) { return _name; }
-
- Block const& m_block;
};
template <typename T>