diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-03 21:24:20 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-03-03 21:24:20 +0000 |
commit | ee069912377bf8f5069489e527af642953d5883d (patch) | |
tree | 97fa985de635d0b5c82158411b80ac3f7b08a915 /c_compiler/include/declaration.hpp | |
parent | 76de3faca823ce51e32f0e3c4bcc6127492efdc5 (diff) | |
download | Compiler-ee069912377bf8f5069489e527af642953d5883d.tar.gz Compiler-ee069912377bf8f5069489e527af642953d5883d.zip |
Going to test
Diffstat (limited to 'c_compiler/include/declaration.hpp')
-rw-r--r-- | c_compiler/include/declaration.hpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/c_compiler/include/declaration.hpp b/c_compiler/include/declaration.hpp index bf72f2d..7fdee1c 100644 --- a/c_compiler/include/declaration.hpp +++ b/c_compiler/include/declaration.hpp @@ -5,19 +5,23 @@ // Declaration that holds a list of declarations -class Declaration : public BaseNode { +class Declaration : public Node { +protected: + Type* type; + std::string id; + Initializer* init; + Declaration* decl; + public: - Declaration(const Base* _var) : BaseNode(_var) {} -}; + Declaration(const Type* _type = nullptr, + const std::string _id = "", + const Initializer* _init = nullptr); -class DeclarationList : public BaseList { -public: - DeclarationList(const Base* _var) : BaseList(_var) {} -}; + virtual void print() const; + virtual void printxml() const; + virtual void printasm() const; -class InitDeclaratorList : public BaseList { -public: - InitDeclaratorList(const Base* _var) : BaseList(_var) {} + }; #endif |