
14 Oct
2008
14 Oct
'08
11:34 p.m.
Can this be made to format macro expansions nicely?
What do you mean by that?
Since the point is to make the code more readable, if we do any macro expansion for instance:
#define SOME_MACRO(...) \ template<class T> \ class C { \ /*stuff*/ \ };
SOME_MACRO(x, y, z)
We don't want this all to end up on one line.
Ok, I see what you mean. Good point. This is really tricky as the backslash/newline's are removed at the lowest level possible - in the lexer. I'm not sure if we're able to re-create this particular formatting. Let me think about this for a while. Perhaps I can coerce the lexer to (optionally) retain this information inside macro expansion sequences. Regards Hartmut