diff options
-rwxr-xr-x | tests/scripts/python/unparse.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index 9f235a5d7..303a69cc5 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -456,6 +456,12 @@ class UnparsePerl(UnparsePython): """Add an AST Pass in output.""" pass + def _ast_return(self, node): + """Add an AST Return in output.""" + self.fill('return') + if node.value: + self.add(' ', node.value, ';') + def _ast_str(self, node): """Add an AST Str in output.""" self.add('"%s"' % node.s.replace('$', '\\$')) @@ -954,6 +960,11 @@ class UnparseGuile(UnparsePython): """Add an AST Pass in output.""" pass + def _ast_return(self, node): + """Add an AST Return in output.""" + if node.value: + self.add(self.fill, node.value) + def _ast_str(self, node): """Add an AST Str in output.""" self.add('"%s"' % node.s) @@ -1149,6 +1160,12 @@ class UnparsePhp(UnparsePython): """Add an AST Pass in output.""" pass + def _ast_return(self, node): + """Add an AST Return in output.""" + self.fill('return') + if node.value: + self.add(' ', node.value, ';') + def _ast_str(self, node): """Add an AST Str in output.""" self.add('"%s"' % node.s.replace('$', '\\$')) |