diff --git a/src/emitted.py b/src/emitted.py index b5c93ed134d98aeb5c2ff279298369f735f2c72e..946ac4a1070172799a688d1723f2adcc88671f84 100644 --- a/src/emitted.py +++ b/src/emitted.py @@ -46,8 +46,8 @@ class Emitted(Channel): for o in emitted: code = o.get_code() - if(code[:len("emit:")]=="emit:"): - code =code[len("emit:"):].strip() + if(code[:len("e:")]=="e:"): + code =code[len("e:"):].strip() if(name==code): self.emits = o else: diff --git a/src/operation.py b/src/operation.py index 1c8360495277134700e1f6c91a84774e16bbcc19..f58c8338dad349879432cf9b00f1d429e8402c08 100644 --- a/src/operation.py +++ b/src/operation.py @@ -712,11 +712,13 @@ class Operation(Executor): if(temp==code): raise Exception("This souldn't happen") - #Remove "emit:" and "takes:" for the subworkklfow inputs and outputs - if(remove_emit_and_take and code[:6] in ["emit: ", "take: "]): - code = code[6:] + #Remove "e:" and "t:" for the subworkklfow inputs and outputs + if(remove_emit_and_take and code[:6] in ["e: ", "t: "] and self.get_artificial_status()): + #print("-", code) + code = code[3:] code = code.strip() + return code def initialise_double_dot(self): diff --git a/src/subworkflow.py b/src/subworkflow.py index 1f8bb5ec9d45b43880339108e9da91c34bc2f17a..b107bb34a71128cc334c8444915b3ed1e6258ba0 100644 --- a/src/subworkflow.py +++ b/src/subworkflow.py @@ -219,7 +219,7 @@ class Subworkflow(Main): #In the case the channel doesn't exist if(channel==None): from .operation import Operation - ope = Operation(f"take: {code[i]}", self) + ope = Operation(f"t: {code[i]}", self) ope.set_as_artificial() from .channel import Channel channel = Channel(code[i], self) @@ -250,7 +250,7 @@ class Subworkflow(Main): if(channels==[]): channels = self.root.get_channels_from_name_other_blocks_on_same_level(code[i]) if(channels!=[]): - ope = Operation(code=f"emit: {code[i]}", origin=self) + ope = Operation(code=f"e: {code[i]}", origin=self) ope.set_as_artificial() for channel in channels: ope.add_element_origins(channel) @@ -262,7 +262,7 @@ class Subworkflow(Main): #Case it's an operation operation = Operation(code[i], self) operation.initialise() - operation.change_code(f"emit: {code[i]}") + operation.change_code(f"e: {code[i]}") operation.set_as_artificial() tab.append(operation) #operation.add_gives(channel)