Commit 3fa3540c authored by Sergio Costas's avatar Sergio Costas

Fixed little bug when there are no functions in a file

parent 67f1be81
...@@ -1271,6 +1271,7 @@ class crust(object): ...@@ -1271,6 +1271,7 @@ class crust(object):
def process_functions(self, tree, thread_status): def process_functions(self, tree, thread_status):
last_len = 0 last_len = 0
total_len = 0
for node in tree: for node in tree:
if node.type == "FUNCTION_DEFINITION": if node.type == "FUNCTION_DEFINITION":
# insert the function arguments as variables # insert the function arguments as variables
...@@ -1314,7 +1315,8 @@ class crust(object): ...@@ -1314,7 +1315,8 @@ class crust(object):
last_len = len(node.name) last_len = len(node.name)
total_len = len(msg) - 1 total_len = len(msg) - 1
self._process_block(node.name, node.child1, tmpvars) self._process_block(node.name, node.child1, tmpvars)
print(" " * total_len + "\r", end = "") if self.verbose:
print(" " * total_len + "\r", end = "")
def _process_block(self, function_name, tree, thread_status): def _process_block(self, function_name, tree, thread_status):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment