Ok, I have add a related post
Re: CC toolbar enhancement.
The explanation we change the code in token.cpp from
if ( ( (parent < 0)
|| (curToken->m_ParentIndex == parent) )
&& (curToken->m_TokenKind & kindMask) )
{
return result;
}
to
if ((curToken->m_ParentIndex == parent) && (curToken->m_TokenKind & kindMask))
{
return result;
}
Is that:
When adding a token, for example, we need to check if this token already exist.
So, it check already exists in the parent scope.
But I'm not sure why the first code need to "parent<0", because the global scope is defined as parent = -1.