mirror of
https://github.com/weechat/weechat.git
synced 2026-06-24 03:46:39 +02:00
tests: fix instruction "return" in Perl/Guile/PHP output
This commit is contained in:
@@ -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('$', '\\$'))
|
||||
|
||||
Reference in New Issue
Block a user