Commit ae1f771f authored by sparonuz's avatar sparonuz
Browse files

[Issue#130]: Fix on the last commit: now reshape call is inserted back in line after rpe cast

parent de8cb09d
......@@ -125,18 +125,13 @@ class ImplementRPE:
module.lines[_index] = line.replace(piece_to_replace, replacement)
elif type_of_exception == "array_reshape":
if arguments.count("["):
array = arguments.split("[")[1]
array = array.split("]")[0]
array = arguments.split("(/")[1]
array = array.split("/)")[0]
# List the arguments inside the reshape function
# List the arguments inside the RESHAPE function
reshape_arg = CallManager.find_call_arguments(line.split("=")[1])
# Insert the cast to RPE
line = Inserter.add_rpe_to_array_arguments(reshape_arg[0])
line = line.replace(reshape_arg[0], Inserter.add_rpe_to_array_arguments(reshape_arg[0]))
module.lines[_index] = line
elif type_of_exception == "has_operation":
piece_to_replace = arguments.split("=")[1].strip()
# Get the elements in operation
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