self.level = 0
self.bol = 1
self.marker = None
+ self.last_marker = 1
self.label_counter = 1
self.error_label = None
self.filename_table = {}
self.f.write("\n");
self.indent()
self.f.write("/* %s */\n" % self.marker)
+ self.last_marker = self.marker
self.marker = None
def put(self, code):
return "0x%02X%02X%02X%02X" % (tuple(pyversion) + (0,0,0,0))[:4]
def mark_pos(self, pos):
-# if self.marker is not None:
-# print "new marker"
file, line, col = pos
contents = self.file_contents(file)
s = s.rstrip() + ' # <<<<<<<<<<<<<< ' + '\n'
context += " * " + s
- self.marker = '"%s":%s\n%s' % (file, line, context)
+ marker = '"%s":%s\n%s' % (file, line, context)
+ if self.last_marker != marker:
+ self.marker = marker
def init_labels(self):
self.label_counter = 0