aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/src/declaration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_compiler/src/declaration.cpp')
-rw-r--r--c_compiler/src/declaration.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/c_compiler/src/declaration.cpp b/c_compiler/src/declaration.cpp
index 2fba9f9..e2f27cc 100644
--- a/c_compiler/src/declaration.cpp
+++ b/c_compiler/src/declaration.cpp
@@ -42,6 +42,11 @@ void Declaration::addList(Declaration* _next_decl)
list_next_decl = _next_decl;
}
+void Declaration::setType(Type* _type)
+{
+ type = _type;
+}
+
Declaration* Declaration::getNext() const
{
return next_decl;
@@ -56,3 +61,8 @@ std::string Declaration::getId() const
{
return id;
}
+
+std::string Declaration::getType() const
+{
+ return type->getType();
+}