Commits

Martin Haye  committed 80245ea

Now properly reversing the transform.

  • Participants
  • Parent commits d9a7015

Comments (0)

Files changed (2)

File AsbFilter.py

     self.pieces.append(stmtsText[s:i])
    
   def isNoOp(self):
-    if not self.stmts:
-      return True
-    if len(self.stmts) > 1:
-      return False
-    return self.stmts[0].strip().upper().startswith("REM")
+    for piece in self.pieces:
+        piece = piece.strip()
+        if piece != "" and not piece.upper().startswith("REM"):
+            return False
+    return True
   
   def __str__(self):
     return self.indent + str(self.lineNum) + "".join(self.pieces)
   cur = s
   for line in block:
     if not line.isNoOp():
-      line.lineNum = cur
+      line.lineNum = str(cur) + " "
       cur += incr
     out.append(line)
     
   block = []
   for line in lines:
     if "Transformed for editing" in line.origText:
-      out.append(line)
+      continue
     elif line.lineNum != "":
       flushBlock(block, startLine, line.lineNum, out)
       block = [line]

File Structris.asb

 
 600 REM SUB CHOOSE SHAPE
     610 M = M + 1
-    620 ON HL * 4 + HR + 1 GOTO 1000,1010,1020,1030,1040,1050,1060,1070,1080,1090,1100,1110,1120,1130,1140,1150
+    620 ON HL * 4 + HR + 1 GOTO 1001,1010,1020,1030,1040,1050,1060,1070,1080,1090,1100,1110,1120,1130,1140,1150
     630 STOP : REM IMPOSSIBLE
 
 700 REM SUB APPLY CHOSEN COORD