diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-12 20:49:21 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-12 20:49:21 +0000 |
commit | 3b0a7ae09d2f9770bfae9f5eed6a6667c9a3c1ca (patch) | |
tree | eece0681cab7486bbb1543197335eab1d29dae46 /c_parser/include/ast_declaration.hpp | |
parent | bd2b74569393c2a12f39fad6a3ad11eef2a367b3 (diff) | |
download | Compiler-3b0a7ae09d2f9770bfae9f5eed6a6667c9a3c1ca.tar.gz Compiler-3b0a7ae09d2f9770bfae9f5eed6a6667c9a3c1ca.zip |
Saving files to make changes
Diffstat (limited to 'c_parser/include/ast_declaration.hpp')
-rw-r--r-- | c_parser/include/ast_declaration.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/c_parser/include/ast_declaration.hpp b/c_parser/include/ast_declaration.hpp new file mode 100644 index 0000000..cce68b6 --- /dev/null +++ b/c_parser/include/ast_declaration.hpp @@ -0,0 +1,17 @@ +#ifndef AST_DECLARATION_HPP +#define AST_DECLARATION_HPP + +#include "ast.hpp" + +class Declaration : public Expression { +private: + const std::string id; +public: + Declaration(const std::string& _id) : id(_id) {} + + virtual void print() const override { + std::cout << id; + } +}; + +#endif |