diff --git a/src/operation.py b/src/operation.py index 60de61db2adaf423f3ca717ea17456aafd648a5f..ce7fd7d67081e4870ff722db5e0aebede057d1bf 100644 --- a/src/operation.py +++ b/src/operation.py @@ -312,16 +312,19 @@ class Operation(Executor): #================================ pattern_emit_name = constant.EMIT_NAME patterns = [pattern_emit_tab, pattern_emit_name] - first_call = True - for pattern in patterns: - #Replace the emits around parenthese by just the emits + for pattern in patterns+[r"\w+"]: + #Replace the emits and channels around parenthese by just themselves (without the parantheses) def replace(text): def replacer(match): return match.group(0).replace(match.group(0), match.group(1)) - return re.sub(f"\(({pattern})\)", replacer, text) + return re.sub(f"\(\s*({pattern})\s*\)", replacer, text) operation = replace(operation) + + first_call = True + for pattern in patterns: + #================================ #Case channel1 = emits #================================