From 5ae557fa523aa9ab166e9fac83a1463abf3be985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 11 Apr 2018 23:20:12 +0200 Subject: [PATCH] tests: fix AST return in TCL --- tests/scripts/python/unparse.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index 6b6cf118e..1e9bea96a 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -786,6 +786,17 @@ class UnparseTcl(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( + ' ', + (self.prefix, '$'), + node.value, + (self.prefix, None), + ) + def _ast_str(self, node): """Add an AST Str in output.""" self.add('"%s"' % node.s.replace('$', '\\$'))