Skip to content
Snippets Groups Projects
Commit 01108655 authored by George Marchment's avatar George Marchment
Browse files

fix a small bug where the emits in parentheses weren't seen

parent b55e7a50
No related branches found
No related tags found
No related merge requests found
Pipeline #14445 failed with stage
in 2 minutes and 28 seconds
......@@ -314,6 +314,14 @@ class Operation(Executor):
patterns = [pattern_emit_tab, pattern_emit_name]
first_call = True
for pattern in patterns:
#Replace the emits around parenthese by just the emits
def replace(text):
def replacer(match):
return match.group(0).replace(match.group(0), match.group(1))
return re.sub(f"\(({pattern})\)", replacer, text)
operation = replace(operation)
#================================
#Case channel1 = emits
#================================
......@@ -348,7 +356,6 @@ class Operation(Executor):
except:
is_operator=False
if(is_operator):
self.add_origin_emits(full_code, name_called, "")
else:
self.add_origin_emits(full_code, name_called, name_emitted)
......@@ -801,7 +808,6 @@ class Operation(Executor):
#We check that the operation is an actuel operation and not just a string for example
#if(len(self.get_origins())==0 and len(self.get_gives())==0):
# self.show_in_structure = False
self.write_summary(self.get_output_dir() / "debug/operations_in_call.nf")
def get_structure(self, dico, to_remove = False):
......
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