Skip to content
Snippets Groups Projects
Commit e3c0e806 authored by Elizabeth's avatar Elizabeth
Browse files

Fixed bug that skipped the last }

parent 445828b2
No related branches found
No related tags found
No related merge requests found
......@@ -81,13 +81,17 @@ def generate_source_code(table, dir_name, filename, source_name):
new_file_contents.append(line)
continue
# Handles case where 1 actual line of code is split into 2 lines
elif line.find("}") != -1 or line.find("{") != -1:
complete_line += line
new_file_contents.append(complete_line)
complete_line = ""
continue
elif line.find(";") == -1: # Last char is always \n
complete_line += line
continue
complete_line += line
orig_func_ind = complete_line.find(knob_config.orig_func_name)
if orig_func_ind != -1:
# Replace from an instance of origOp to first instance of ) after origOp
# with the new function call
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment