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/translation_unit.hpp | |
parent | 6b7f5137edb18372bc3e3076dab1cb45c8e4c2ec (diff) | |
download | Compiler-eccb6c5360f213675a513e875bc424b8bdee16e7.tar.gz Compiler-eccb6c5360f213675a513e875bc424b8bdee16e7.zip |
Finished ast change and it works
Diffstat (limited to 'c_compiler/include/translation_unit.hpp')
-rw-r--r-- | c_compiler/include/translation_unit.hpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/c_compiler/include/translation_unit.hpp b/c_compiler/include/translation_unit.hpp index dd8ff03..42822f9 100644 --- a/c_compiler/include/translation_unit.hpp +++ b/c_compiler/include/translation_unit.hpp @@ -6,23 +6,16 @@ class TranslationUnit : public Node { protected: - std::vector<Node* > m_transUnit; + std::vector<Node* > translation_unit; + public: - TranslationUnit(Node* decl) { - m_transUnit.push_back(decl); - } + TranslationUnit(Node* decl); - virtual void print() const { - for(auto& i : m_transUnit) { - i->print(); - } - } - virtual void printxml() const {} - virtual void printasm() const {} + virtual void print() const; + virtual void printxml() const; + virtual void printasm() const; - void push(Node* decl) { - m_transUnit.push_back(decl); - } + void push(Node* decl); }; |