[Mumps2Py:] [18] Token.dscr() just returns a string describing the token type.

[ Thread Index | Date Index | More lists.mumps2py.org/discuss Archives ]


Revision: 18
Author:   pgallot
Date:     2008-01-17 20:32:45 +0000 (Thu, 17 Jan 2008)

Log Message:
-----------
Token.dscr() just returns a string describing the token type.

Modified Paths:
--------------
    trunk/mumps2py/tokens.py


Modified: trunk/mumps2py/tokens.py
===================================================================
--- trunk/mumps2py/tokens.py	2008-01-17 19:38:55 UTC (rev 17)
+++ trunk/mumps2py/tokens.py	2008-01-17 20:32:45 UTC (rev 18)
@@ -363,6 +363,10 @@
         """set the token's post-condition expression."""
         self.post_condition_expr = tv_expr
 
+    def dscr(self):
+        """describes what type of token this is."""
+        return TOKEN_REVERSE_DICT[self.toktype]
+    
     def line_no(self, lineno):
         """set the linenumber on which token occured.
 In practice, this is only done for the first command on a line.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/