diff options
Diffstat (limited to 'c_parser/include/ast_primitives.hpp')
-rw-r--r-- | c_parser/include/ast_primitives.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/c_parser/include/ast_primitives.hpp b/c_parser/include/ast_primitives.hpp new file mode 100644 index 0000000..fbcb1b4 --- /dev/null +++ b/c_parser/include/ast_primitives.hpp @@ -0,0 +1,19 @@ +#ifndef AST_PRIMITIVES_HPP +#define AST_PRIMITIVES_HPP + +#include "ast.hpp" + +#include <string> + +class ast_Variable : public ast_Base { +private: + std::string id; +public: + ast_Variable(const std::string& _id) : id(_id) {} + + virtual void print() const override { + std::cout << "<Variable id=\"" << id << "\" />" << std::endl; + } +}; + +#endif |