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

Fix minor bug

parent 49cf5812
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,7 @@ DOUBLE_DOT = r"(\w+)\s*=\s*([^\?\n]+)\s*\?([^\n]+)"
DOUBLE_DOT_TUPLE = r"\(\s*\w+\s*(,\s*\w+\s*)+\)\s*=\s*([^\?\n]+)\s*\?([^\n]+)"
END_OPERATOR = r' *(\(|{)'
ILLEGAL_CHARCTER_BEFORE_POTENTIAL_CHANNELS = r"\w|\'|\"|\."
ILLEGAL_CHARCTER_AFTER_POTENTIAL_CHANNELS = r"\w"
MERGE_OPERATIONS = r'\.\s*((merge|mix|concat|spread|join|phase|cross|combine|fromList|collect|fromPath|value|from)\s*(\(|\{))'
OPERATOR_IN_PIPE = r"\w+ *{[^}]*}|\w+ *\([^\)]*\)|\w+"
SET_OPERATORS = ["choice", "separate", "tap", "into", "set"]
......
......@@ -437,8 +437,11 @@ class Operation(Executor):
to_add = True
for p in pos:
if(p>0):
#Check it is actually the channel and not a different channel
if(bool(re.fullmatch(constant.ILLEGAL_CHARCTER_BEFORE_POTENTIAL_CHANNELS, operation[p-1]))):
to_add = False
if(bool(re.fullmatch(constant.ILLEGAL_CHARCTER_AFTER_POTENTIAL_CHANNELS, operation[p+len(c.get_name())]))):
to_add = False
if(to_add):
self.add_origin(c.get_name())
#TODO update this -> it's an operation itselfs
......
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