Thanks for the report, I can confirm this bug.
The reason I found is that, the anchor point(m_TokenIndex) when we first start macro expansion was wrongly reset, so that
"member" is expanded infinite times.
I don't have a clean way to fix this issue......
EDIT:
bool Tokenizer::ReplaceBufferText(const wxString& target, const Token* macro)
{
if (target.IsEmpty())
return true; // the token is removed from the buffer, return true, so we need to fetch another token
if (m_ExpandedMacros.size() >= s_MaxMacroReplaceDepth)
{
// clear the macro expansion stack
m_ExpandedMacros.clear();
m_PeekAvailable = false;
return true; // NOTE: we have to skip the problem token by returning true.
}
...
The problem is here, when (m_ExpandedMacros.size() >= s_MaxMacroReplaceDepth) happens, the m_ExpandedMacros stack get cleaned up, so that the "anchor point" saved in the deepest use macro is lost.