diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-17 14:44:53 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-17 14:44:53 +0000 |
commit | 6c4106967613cfebfe8582c84eacbf5b4110729f (patch) | |
tree | 5d42bc0d0eea785035f79f880b41c866b7924f19 /c_parser/include/ast_primitives.hpp | |
parent | a60337264c2551fffc2b5aeea12f40a06b7cb0e9 (diff) | |
download | Compiler-6c4106967613cfebfe8582c84eacbf5b4110729f.tar.gz Compiler-6c4106967613cfebfe8582c84eacbf5b4110729f.zip |
Making functions work
Diffstat (limited to 'c_parser/include/ast_primitives.hpp')
-rw-r--r-- | c_parser/include/ast_primitives.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/c_parser/include/ast_primitives.hpp b/c_parser/include/ast_primitives.hpp index 21629e7..d878780 100644 --- a/c_parser/include/ast_primitives.hpp +++ b/c_parser/include/ast_primitives.hpp @@ -18,4 +18,17 @@ public: virtual void push(const ast_Base* var) const {} }; +class ast_Parameter : public ast_Base { +private: + std::string id; +public: + ast_Parameter(const std::string& _id) : id(_id) {} + + virtual void print() const { + std::cout << "<Parameter id=\"" << id << "\" />" << std::endl; + } + + virtual void push(const ast_Base* var) const {} +}; + #endif |