changeset 183:ed8996462be5

pretty_print: added print of void-returns
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 16 Dec 2009 14:28:57 +0100
parents 4011495cad44
children b2ba68f717f8
files pysmcl/pretty_print.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/pretty_print.py	Wed Dec 16 14:28:22 2009 +0100
+++ b/pysmcl/pretty_print.py	Wed Dec 16 14:28:57 2009 +0100
@@ -287,7 +287,10 @@
         self.print_body(node.body)
 
     def visit_Return(self, node):
-        self.print_indented("return %s" % expr_string(node.value))
+        if(node.value):
+            self.print_indented("return %s" % expr_string(node.value))
+        else:
+            self.print_indented("return")
 
     def visit_Delete(self, node):
         assert False, "Not implemented"