[pypy-svn] r42780 - pypy/dist/pypy/translator/cli

antocuni at codespeak.net antocuni at codespeak.net
Mon May 7 11:55:00 CEST 2007


Author: antocuni
Date: Mon May  7 11:55:00 2007
New Revision: 42780

Modified:
   pypy/dist/pypy/translator/cli/cts.py
Log:
a much saner way to escape keywords



Modified: pypy/dist/pypy/translator/cli/cts.py
==============================================================================
--- pypy/dist/pypy/translator/cli/cts.py	(original)
+++ pypy/dist/pypy/translator/cli/cts.py	Mon May  7 11:55:00 2007
@@ -136,7 +136,7 @@
     def escape_name(self, name):
         """Mangle then name if it's a ilasm reserved word"""
         if name in self.ILASM_KEYWORDS:
-            return name + '__MANGLED' # XXX: it could not be unique
+            return "'%s'" % name
         else:
             return name
 


More information about the pypy-svn mailing list