
Ovanes Markarian wrote:
I have a question regardning the is_defined_macro member of context type. Is it intended, that this member is non-const? (CVS version as well)
Good catch! I'll change that.
And I just saw that there is no way to retrieve the macro value. If I can query if some macro is defined, why can't I retrieve its value if it is not a function like macro. The other solution would be to implement preprocessing_hooks, but I would prefer to have a member function which can retrieve this value for me.
There is the function get_macro_definition() allowing to retrieve the
complete set of information about a defined macro. As I recognized just
right now, this is not documented for some reason. So here you go:
Let's assume:
typedef context_type::position_type position_type;
typedef context_type::token_type token_type;
typedef context_type::token_sequence_type token_sequence_type;
get_macro_definition
bool get_macro_definition(
token_type::string_type const &name,
bool &is_function_style,
bool &is_predefined, position_type &pos,
std::vector