diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-05 20:55:12 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-05 20:55:12 +0000 |
commit | eccb6c5360f213675a513e875bc424b8bdee16e7 (patch) | |
tree | 88b2826a2898223bcd5f02d5e5fd1f2c1c9b7e2a /c_compiler/include/function.hpp | |
parent | 6b7f5137edb18372bc3e3076dab1cb45c8e4c2ec (diff) | |
download | Compiler-eccb6c5360f213675a513e875bc424b8bdee16e7.tar.gz Compiler-eccb6c5360f213675a513e875bc424b8bdee16e7.zip |
Finished ast change and it works
Diffstat (limited to 'c_compiler/include/function.hpp')
-rw-r--r-- | c_compiler/include/function.hpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/c_compiler/include/function.hpp b/c_compiler/include/function.hpp index cb68b2f..edfb958 100644 --- a/c_compiler/include/function.hpp +++ b/c_compiler/include/function.hpp @@ -1,4 +1,4 @@ -#ifndef AST_FUNCTION_HPP + #ifndef AST_FUNCTION_HPP #define AST_FUNCTION_HPP #include "ast.hpp" @@ -12,16 +12,11 @@ protected: Statement* statement; public: - Function(const std::string& _id, Declaration* _parameter_list) : id(_id), parameter_list(_parameter_list) {} + Function(const std::string& _id, Declaration* _parameter_list, Statement* _statement); - virtual void print() const { - std::cout << id << std::endl; - if(parameter_list != nullptr) - parameter_list->print(); - } - - virtual void printxml() const {} - virtual void printasm() const {} + virtual void print() const; + virtual void printxml() const; + virtual void printasm() const; }; |