aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/include/function.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_compiler/include/function.hpp')
-rw-r--r--c_compiler/include/function.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/c_compiler/include/function.hpp b/c_compiler/include/function.hpp
new file mode 100644
index 0000000..77d1372
--- /dev/null
+++ b/c_compiler/include/function.hpp
@@ -0,0 +1,26 @@
+#ifndef AST_FUNCTION_HPP
+#define AST_FUNCTION_HPP
+
+#include "node.hpp"
+
+class Declaration;
+class Statement;
+
+
+class Function : public Node {
+protected:
+ Type* type;
+ std::string id;
+ Declaration* parameter_list;
+ Statement* statement;
+
+public:
+ Function(const std::string& _id, Declaration* _parameter_list, Statement* _statement);
+
+ virtual void print() const;
+ virtual void printxml() const;
+ virtual VariableStackBindings printasm(VariableStackBindings bindings) const;
+};
+
+
+#endif