# HG changeset patch # User Paul Boddie # Date 1488223254 -3600 # Node ID 7c23da3178e127bfe16693327e0cd28d117f426e # Parent 1b6f40b2928e42e4f31e6f6bdaee0f59e562756a Removed superfluous brackets and changed the vertical spacing of statements. diff -r 1b6f40b2928e -r 7c23da3178e1 translator.py --- a/translator.py Mon Feb 27 19:18:55 2017 +0100 +++ b/translator.py Mon Feb 27 20:20:54 2017 +0100 @@ -330,7 +330,7 @@ "Return the result in a form suitable for direct testing." expr = self._convert(self.expr) - return "(!(%s))" % expr + return "(!%s)" % expr def __str__(self): return "(%s ? %s : %s)" % ( @@ -1293,6 +1293,8 @@ self.process_structure_node(n.else_) self.end_else() + print >>self.out + def process_invocation_node(self, n): "Process the given invocation node 'n'." @@ -1843,6 +1845,7 @@ self.indent -= 1 self.writeline("}") + print >>self.out def process_try_finally_node(self, n): @@ -1878,6 +1881,7 @@ self.indent -= 1 self.writeline("}") + print >>self.out def process_try_completion(self): @@ -1931,6 +1935,7 @@ self.indent -= 1 self.writeline("}") + print >>self.out # Special variable usage. @@ -1993,6 +1998,7 @@ self.out = self.out_toplevel self.write_temporaries(name) + print >>self.out out.seek(0) self.out.write(out.read()) @@ -2154,7 +2160,6 @@ print >>self.out, "%s%s" % (self.pad(), self.indenttext(s, self.indent + 1)) def writestmt(self, s): - print >>self.out self.writeline(s) def write_comment(self, s):