# HG changeset patch # User Paul Boddie # Date 1488910869 -3600 # Node ID ff6b931a4b0eca281cb9c3d7e8921e11c7ac0184 # Parent 3667aa107f4840a1b924c8070af729be0e681714 Reorganised the unit output further. diff -r 3667aa107f48 -r ff6b931a4b0e translator.py --- a/translator.py Tue Mar 07 19:09:19 2017 +0100 +++ b/translator.py Tue Mar 07 19:21:09 2017 +0100 @@ -1744,9 +1744,6 @@ out.seek(0) self.out.write(out.read()) - self.indent -= 1 - print >>self.out, "}" - def start_module(self): "Write the start of each module's main function." @@ -1776,6 +1773,9 @@ out = self.end_unit() self.flush_unit(self.name, out) + self.indent -= 1 + print >>self.out, "}" + def start_function(self, name): "Start the function having the given 'name'." @@ -1825,6 +1825,9 @@ self.write_parameters(name) self.flush_unit(name, out) + + self.indent -= 1 + print >>self.out, "}" print >>self.out def write_temporaries(self, name):