diff --git a/create_empty_fun.py b/create_empty_fun.py index 0bec7d9..11679e2 100644 --- a/create_empty_fun.py +++ b/create_empty_fun.py @@ -56,6 +56,7 @@ def find_func_decl(file:str): list_str=f.readlines() text="" ignore=False + go_on=False for i in list_str: line=i.strip() if(len(line)==0): @@ -71,13 +72,23 @@ def find_func_decl(file:str): if(ignore): ignore=False continue - if(line[-1]==';'): - text+=line[:-1] + if(line.find('(')>0): + text=line + if(line.find(');')<0): + go_on=True + continue + if go_on: + text+=line + if(line.find(');')>0): + go_on=False + if not go_on: par_start=text.find('(') - par_end=text.find(')') + par_end=text.find(');') + if(text.count('(')!=1 or text.count(')')!=1): + continue if(par_start>0 and par_end>0 and par_start