@@ -220,20 +220,38 @@ internal F4_LANGUAGE_INDEXFILE(F4_CPP_IndexFile)
220
220
}
221
221
222
222
// ~ NOTE(rjf): Structs
223
- else if (F4_Index_ParsePattern (ctx, " %t" , " struct" ) ||
224
- F4_Index_ParsePattern (ctx, " %t%t" , " typedef" , " struct" ))
223
+ else if (F4_Index_ParsePattern (ctx, " %t" , " struct" ))
224
+ {
225
+ handled = 1 ;
226
+ F4_CPP_ParseStructOrUnionBodyIFuckingHateCPlusPlus (ctx, F4_Index_NoteFlag_ProductType);
227
+ }
228
+ else if (F4_Index_ParsePattern (ctx, " %t%t" , " typedef" , " struct" ))
225
229
{
226
230
handled = 1 ;
227
231
F4_CPP_ParseStructOrUnionBodyIFuckingHateCPlusPlus (ctx, 0 );
232
+ if (F4_Index_ParsePattern (ctx, " %k" , TokenBaseKind_Identifier, &name))
233
+ {
234
+ F4_Index_MakeNote (ctx->app , ctx->file , 0 , F4_Index_StringFromToken (ctx, name),
235
+ F4_Index_NoteKind_Type, F4_Index_NoteFlag_ProductType, Ii64 (name));
236
+ }
228
237
}
229
238
230
239
// ~ NOTE(rjf): Unions
231
- else if (F4_Index_ParsePattern (ctx, " %t" , " union" ) ||
232
- F4_Index_ParsePattern (ctx, " %t%t" , " typedef" , " union" ))
240
+ else if (F4_Index_ParsePattern (ctx, " %t" , " union" ))
233
241
{
234
242
handled = 1 ;
235
243
F4_CPP_ParseStructOrUnionBodyIFuckingHateCPlusPlus (ctx, F4_Index_NoteFlag_SumType);
236
244
}
245
+ else if (F4_Index_ParsePattern (ctx, " %t%t" , " typedef" , " union" ))
246
+ {
247
+ handled = 1 ;
248
+ F4_CPP_ParseStructOrUnionBodyIFuckingHateCPlusPlus (ctx, F4_Index_NoteFlag_SumType);
249
+ if (F4_Index_ParsePattern (ctx, " %k" , TokenBaseKind_Identifier, &name))
250
+ {
251
+ F4_Index_MakeNote (ctx->app , ctx->file , 0 , F4_Index_StringFromToken (ctx, name),
252
+ F4_Index_NoteKind_Type, F4_Index_NoteFlag_SumType, Ii64 (name));
253
+ }
254
+ }
237
255
238
256
// ~ NOTE(rjf): Typedef'd Enums
239
257
else if (F4_Index_ParsePattern (ctx, " %t%t%k" , " typedef" , " enum" , TokenBaseKind_Identifier, &name) ||
0 commit comments