I'm looking for a macro to combine two field expressions which may also include arrays, calls, casts and potentially other expressions that I haven't thought of.
For example, a.b[0] and c().d would become a.b[0].c().d.
I think to write such a macro would involve traversing down the right hand expression tree until reaching a EConst CIdent and turning it into an EField of the left hand expression. Does this sound sensible?
It certainly seems like something that probably already exists, though. Does anyone know where I could find it if so?