1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-21 18:36:39 +02:00

tests: fix AST return in Perl

This commit is contained in:
Sébastien Helleu
2018-04-11 23:02:02 +02:00
parent da960e9176
commit cb4348df61
+8 -1
View File
@@ -460,7 +460,14 @@ class UnparsePerl(UnparsePython):
"""Add an AST Return in output."""
self.fill('return')
if node.value:
self.add(' ', node.value, ';')
self.add(
' ',
(self.prefix,
'%' if isinstance(node.value, ast.Dict) else '$'),
node.value,
(self.prefix, None),
';',
)
def _ast_str(self, node):
"""Add an AST Str in output."""