diff options
Diffstat (limited to 'libjulia/optimiser/ASTCopier.h')
-rw-r--r-- | libjulia/optimiser/ASTCopier.h | 18 |
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> |