[Mumps2Py:] [134] fixed breakage caused by label-handling rework in mumps2tok. |
[ Thread Index |
Date Index
| More lists.mumps2py.org/discuss Archives
]
Revision: 134
Author: pgallot
Date: 2008-02-26 22:56:59 +0000 (Tue, 26 Feb 2008)
Log Message:
-----------
fixed breakage caused by label-handling rework in mumps2tok.
Modified Paths:
--------------
trunk/mumps2py/tok2python.py
Modified: trunk/mumps2py/tok2python.py
===================================================================
--- trunk/mumps2py/tok2python.py 2008-02-26 04:51:56 UTC (rev 133)
+++ trunk/mumps2py/tok2python.py 2008-02-26 22:56:59 UTC (rev 134)
@@ -139,17 +139,17 @@
def translate_label(translation, token):
"""translate a Mumps label to Python"""
- if token.parameters:
- if len(token.parameters) == 1:
- return "def %s(%s):\n" % (token.val, token.parameters[0])
+ if token.params:
+ if len(token.params) == 1:
+ return "def %s(%s):\n" % (token.val, token.params[0])
else:
label_str = "def %s(" % (token.val)
- for param in token.parameters:
+ for param in token.params:
label_str = "%s%s ," % (label_str, param)
label_str = label_str[:-2] + " ):\n"
return label_str
else:
- return "def %s():\n" % (token.Name)
+ return "def %s():\n" % (token.val)
def translate_expr(translation, token):
"""translate a Mumps expression Command to Python"""