Example #1
0
 def replace(self, data, branch_in=False):
     length = sum(editlength(obj) for obj in data)
     self.buffer.do(self.marker, replace(data))
     if self.marker.dot:
         self.marker = dotmarker(self.marker.hole, visited = not branch_in)
     else:
         cursor = self.marker.start + length * (not branch_in)
         self.marker = starmarker(self.marker.hole, cursor, cursor)
     if branch_in:
         self.walk()
Example #2
0
 def remove(self):
     if self.marker.dot:
         self.buffer.do(self.marker, replace([None]))
     else:
         self.replace([])