Some progress about the code suggestion on a complex expression.
((GPIO_TypeDef*)((((uint32_t)0x40000000)+0x08000000)+0x00000000))->CC
This is the code when the parser actually see:
((GPIO_TypeDef *) GPIOA_BASE)->CC
Now, here is the tree for code completion.
CC
->
(((uint32_t)0x40000000)+0x08000000)+0x00000000
CAST
*
GPIO_TypeDef
For a type cast node(which shows "CAST" above), only the left tree is interesting, so tree traversal could have some steps
1, get the GPIO_TypeDef
2, get the pointer to GPIO_TypeDef
3, get the member of GPIO_TypeDef
With the step 3, you will list all the members of the GPIO_TypeDef.
The problem is that my test code is just some standalone program, it should be integrated(maybe replace) into the CC's source code, so there may be a lot of code changes.