summaryrefslogtreecommitdiff
path: root/tests/scripts/python
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-04-11 23:10:46 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-04-11 23:10:46 +0200
commitb2344fe5d66f80e43f1b1b37907d439b57e23d10 (patch)
tree742e810a2fc4f8493448cfbf745a667f71ee97a9 /tests/scripts/python
parentcb4348df612e76cc3fbf65081170dd64bd38ecd2 (diff)
downloadweechat-b2344fe5d66f80e43f1b1b37907d439b57e23d10.zip
tests: fix AST return in PHP
Diffstat (limited to 'tests/scripts/python')
-rwxr-xr-xtests/scripts/python/unparse.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py
index 423db1549..6b6cf118e 100755
--- a/tests/scripts/python/unparse.py
+++ b/tests/scripts/python/unparse.py
@@ -1163,7 +1163,13 @@ class UnparsePhp(UnparsePython):
"""Add an AST Return in output."""
self.fill('return')
if node.value:
- self.add(' ', node.value, ';')
+ self.add(
+ ' ',
+ (self.prefix, '$'),
+ node.value,
+ (self.prefix, None),
+ ';',
+ )
def _ast_str(self, node):
"""Add an AST Str in output."""