aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser/include/ast_expression.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_parser/include/ast_expression.hpp')
-rw-r--r--c_parser/include/ast_expression.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/c_parser/include/ast_expression.hpp b/c_parser/include/ast_expression.hpp
new file mode 100644
index 0000000..2e223f4
--- /dev/null
+++ b/c_parser/include/ast_expression.hpp
@@ -0,0 +1,30 @@
+#ifndef AST_EXPRESSION_HPP
+#define AST_EXPRESSION_HPP
+
+#include "ast.hpp"
+
+#include <string>
+#include <iostream>
+
+class ast_Expression : public ast_Base {
+private:
+ std::string id;
+public:
+ ast_Expression(const std::string& _id) : id(_id) {}
+
+ virtual void print() const {
+
+ }
+
+ virtual void push(const ast_Base* _base) const {
+ std::cerr << "Can't call this function for this type" << std::endl;
+ (void)_base;
+ }
+};
+
+class ast_ReturnExpression : public ast_Expression {
+public:
+ ast_ReturnExpression(const std::string& _id) : ast_Expression(_id) {}
+};
+
+#endif