On Wed, Feb 23, 2005 at 06:51:46PM +0100, Gabriel Dos Reis wrote: > | I think that the best solution for the long term is the caret approach, > | printing out the original source line that the user typed. Trying to > | re-generate the expression from the tree is likely to generate something > | completely unlike the text of the original program. I do acknowledge that > | re-generating the expression could be helpful in the case where a macro > | expands into something the user did not expect, but that's not going to be > | the common case in C++. > > many C++ programs are full of macros (more than would be desired). > And more and moe popular C++ libraries seem to make far more > extensive use of macros than in average programs in the past.
But a single statement expression can have thousands statements in it, do you want to print them all? Jakub