For example i have this statement in my function definition
(void)((void)( SchM_Enter_Com(COM_EXCLUSIVE_AREA_0), (*( uint8 *)((((&*bix_rx_bms_stat_ar2_BMS_BatTmp_Max_A*))))) = (uint8) ( ((*(com_UnionBuffer.raw)[(0u) + 2]* & (uint8)0xe0) >> 5u) | (((com_UnionBuffer.raw)[(0u) + 3] & (uint8)0x1f) << 3u) ), SchM_Exit_Com(COM_EXCLUSIVE_AREA_0), (uint8)(((0 < com_LMgt_RxPduGroupState[((PduIdType)0)])) ? 0u : 0x80u) ), ((Std_ReturnType)(0U)));
I would like to extract the name and the array indexes(which are in italics). I would really appreciate some help here?
A good example to follow is func_calls -- it extracts all calls to a given function. Similarly you can extract other parts of the AST. To explore the AST generated for your code see the explore_ast example.