1.1 --- a/translator.py Mon Feb 27 19:18:55 2017 +0100
1.2 +++ b/translator.py Mon Feb 27 20:20:54 2017 +0100
1.3 @@ -330,7 +330,7 @@
1.4 "Return the result in a form suitable for direct testing."
1.5
1.6 expr = self._convert(self.expr)
1.7 - return "(!(%s))" % expr
1.8 + return "(!%s)" % expr
1.9
1.10 def __str__(self):
1.11 return "(%s ? %s : %s)" % (
1.12 @@ -1293,6 +1293,8 @@
1.13 self.process_structure_node(n.else_)
1.14 self.end_else()
1.15
1.16 + print >>self.out
1.17 +
1.18 def process_invocation_node(self, n):
1.19
1.20 "Process the given invocation node 'n'."
1.21 @@ -1843,6 +1845,7 @@
1.22
1.23 self.indent -= 1
1.24 self.writeline("}")
1.25 + print >>self.out
1.26
1.27 def process_try_finally_node(self, n):
1.28
1.29 @@ -1878,6 +1881,7 @@
1.30
1.31 self.indent -= 1
1.32 self.writeline("}")
1.33 + print >>self.out
1.34
1.35 def process_try_completion(self):
1.36
1.37 @@ -1931,6 +1935,7 @@
1.38
1.39 self.indent -= 1
1.40 self.writeline("}")
1.41 + print >>self.out
1.42
1.43 # Special variable usage.
1.44
1.45 @@ -1993,6 +1998,7 @@
1.46 self.out = self.out_toplevel
1.47
1.48 self.write_temporaries(name)
1.49 + print >>self.out
1.50 out.seek(0)
1.51 self.out.write(out.read())
1.52
1.53 @@ -2154,7 +2160,6 @@
1.54 print >>self.out, "%s%s" % (self.pad(), self.indenttext(s, self.indent + 1))
1.55
1.56 def writestmt(self, s):
1.57 - print >>self.out
1.58 self.writeline(s)
1.59
1.60 def write_comment(self, s):