Explorar el Código

LoLAConvert: Handle syntax for transition not consuming or producing.

bentleyjoakes hace 6 años
padre
commit
7b5d7adbbd
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      LoLAConvert.py

+ 6 - 0
LoLAConvert.py

@@ -54,6 +54,9 @@ class LoLAConvert:
                         produce[t] = w
 
                 f.write("\tCONSUME\n")
+                if len(consume) == 0:
+                    f.write(";\n")
+
                 for i, s in enumerate(consume):
                     f.write("\t\t" + places[s][0] + " : " + consume[s])
                     if i < len(consume) - 1:
@@ -61,6 +64,9 @@ class LoLAConvert:
                     else:
                         f.write(";\n")
                 f.write("\tPRODUCE\n")
+                if len(produce) == 0:
+                    f.write(";\n")
+
                 for i, t in enumerate(produce):
                     f.write("\t\t" + places[t][0] + " : " + produce[t])
                     if i < len(produce) - 1: