[Mumps2Py:] [175] don't do the token name look-up while counting subtokens, just use the toktype directly. |
[ Thread Index |
Date Index
| More lists.mumps2py.org/discuss Archives
]
Revision: 175
Author: pgallot
Date: 2008-03-13 16:04:02 +0000 (Thu, 13 Mar 2008)
Log Message:
-----------
don't do the token name look-up while counting subtokens, just use the toktype directly.
Modified Paths:
--------------
trunk/mumps2py/tokens.py
Modified: trunk/mumps2py/tokens.py
===================================================================
--- trunk/mumps2py/tokens.py 2008-03-12 21:35:54 UTC (rev 174)
+++ trunk/mumps2py/tokens.py 2008-03-13 16:04:02 UTC (rev 175)
@@ -409,7 +409,7 @@
def count_subtokens(count_dict, token):
"""counts the differen types of tokens and subtokens."""
- token_key = TOKEN_REVERSE_DICT.get(token.toktype, token.toktype)
+ token_key = token.toktype
for var in [key for key in token.__dict__.keys() if key \
not in ('start', 'end', 'toktype', 'lineno')]: