aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser/include/ast_primitives.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_parser/include/ast_primitives.hpp')
-rw-r--r--c_parser/include/ast_primitives.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/c_parser/include/ast_primitives.hpp b/c_parser/include/ast_primitives.hpp
index d878780..5ae6d12 100644
--- a/c_parser/include/ast_primitives.hpp
+++ b/c_parser/include/ast_primitives.hpp
@@ -15,7 +15,10 @@ public:
std::cout << "<Variable id=\"" << id << "\" />" << std::endl;
}
- virtual void push(const ast_Base* var) const {}
+ virtual void push(const ast_Base* var) const {
+ std::cerr << "Error: Can't call this function on this class" << std::endl;
+ (void)var;
+ }
};
class ast_Parameter : public ast_Base {
@@ -28,7 +31,10 @@ public:
std::cout << "<Parameter id=\"" << id << "\" />" << std::endl;
}
- virtual void push(const ast_Base* var) const {}
+ virtual void push(const ast_Base* var) const {
+ std::cerr << "Error: Can't call this function on this class" << std::endl;
+ (void)var;
+ }
};
#endif