C++ is too complex and its grammar is context dependant, the way Alpha use was set the identifier to a group, then let the scintilla to colorize the group in the same color. I think we can follow what the way clang sematic highlight plugin use, I mean write our own lexer for scintilla, colorize each piece of text by the token type. The token type info can be queryed from the tokentree. But this may still cause error, because our parser does not do sematic check.
EDIT: It looks that it is impossible to query every text info from the tokentree, our tokentree only hold the variable definition info, but for other variable usage(reference), it need the AI() function, this will make the custom lexer much slower.