def compile(self): emit.comment(repr(self)) self.location = emit.location() for fn, origin in self.fns: fn(origin, self.location) del self.fns
def produce(self, fn): if self.location is None: self.fns.append((fn, emit.location())) else: fn(emit.location(), self.location)