from Function import * def process(FILE_IN): # Read file. lines_in = [] with open(FILE_IN) as file: for line in file: lines_in.append(line.rstrip()) f = Function() # Translate. for ln in lines_in: ln = ln.rstrip() # Ignore includes. if "#include" in ln: continue f.parseLine(ln) if f.isComplete: print("Function ready!") break return f"Debug: {f}"