Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57906 - trunk/boost/spirit/home/lex/lexer
From: hartmut.kaiser_at_[hidden]
Date: 2009-11-24 15:58:06


Author: hkaiser
Date: 2009-11-24 15:58:05 EST (Tue, 24 Nov 2009)
New Revision: 57906
URL: http://svn.boost.org/trac/boost/changeset/57906

Log:
Spirit: fixed token_def::what()
Text files modified:
   trunk/boost/spirit/home/lex/lexer/token_def.hpp | 5 ++++-
   1 files changed, 4 insertions(+), 1 deletions(-)

Modified: trunk/boost/spirit/home/lex/lexer/token_def.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/token_def.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/token_def.hpp 2009-11-24 15:58:05 EST (Tue, 24 Nov 2009)
@@ -109,7 +109,10 @@
         template <typename Context>
         info what(Context& /*context*/) const
         {
- return info("token_def");
+ if (0 == def_.which()) {
+ return info("token_def", get<string_type>(def_));
+ }
+ return info("token_def", get<char_type>(def_));
         }
 
         ///////////////////////////////////////////////////////////////////////


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk