diff options
Diffstat (limited to 'c_compiler/src/function.cpp')
-rw-r--r-- | c_compiler/src/function.cpp | 8 |
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; +} |