summaryrefslogtreecommitdiff
path: root/tests/scripts/python
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-04-11 23:20:12 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-04-11 23:20:12 +0200
commit5ae557fa523aa9ab166e9fac83a1463abf3be985 (patch)
tree8e678ff506b2005e7a0d25528f8ff1310bc41dc1 /tests/scripts/python
parentb2344fe5d66f80e43f1b1b37907d439b57e23d10 (diff)
downloadweechat-5ae557fa523aa9ab166e9fac83a1463abf3be985.zip
tests: fix AST return in TCL
Diffstat (limited to 'tests/scripts/python')
-rwxr-xr-xtests/scripts/python/unparse.py11
1 files changed, 11 insertions, 0 deletions
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('$', '\\$'))