aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/src/function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c_compiler/src/function.cpp')
-rw-r--r--c_compiler/src/function.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/c_compiler/src/function.cpp b/c_compiler/src/function.cpp
index a132280..acd5547 100644
--- a/c_compiler/src/function.cpp
+++ b/c_compiler/src/function.cpp
@@ -44,4 +44,10 @@ void Function::printxml() const
}
void Function::printasm() const
-{}
+{
+ int32_t count = 0;
+ if(statement != nullptr)
+ statement->count_variables(count);
+
+ std::cout << id << ": " << count << " variables defined" << std::endl;
+}