@@ -286,10 +286,8 @@ def get_chunk_identifiers(chunk: str) -> List[str]:
286
286
if chunk == 'EXTERN_C IMAGE_DOS_HEADER __ImageBase;' :
287
287
return ['__ImageBase' ]
288
288
289
- if chunk .startswith ('DEFINE_GUID' ):
290
- if match := re .match (r'^DEFINE_GUID\(\s*(\w+),' , chunk ):
291
- return [match .group (1 )]
292
- assert False , chunk
289
+ if match := re .match (r'^DEFINE_GUID\(\s*(\w+),' , chunk ):
290
+ return [match .group (1 )]
293
291
294
292
if match := re .match (r'^EXTERN_C DECLSPEC_SELECTANY CONST GUID (\w+) =' , chunk ):
295
293
return [match .group (1 )]
@@ -300,6 +298,17 @@ def get_chunk_identifiers(chunk: str) -> List[str]:
300
298
if match := re .match (r'^(?:enum|struct) (\w+);$' , chunk ):
301
299
return [match .group (1 )]
302
300
301
+ if match := re .match (r'^(DEFINE_ENUM_FLAG_OPERATORS|C_ASSERT)\s*\(' , chunk ):
302
+ return []
303
+
304
+ if match := re .match (r'^\s*(\w+)\s*\(' , chunk ):
305
+ assert match .group (1 ) in [
306
+ '_At_' ,
307
+ '_Post_satisfies_' ,
308
+ '_Success_' ,
309
+ '_When_' ,
310
+ ], chunk
311
+
303
312
# Functions.
304
313
if ident := get_function_identifier (chunk ):
305
314
return [ident ]
@@ -743,6 +752,9 @@ def organize_chunks_to_dir(chunks: List[Chunk], ident_to_id: Dict[str, str], ass
743
752
id_to_body [id ] = chunk .body
744
753
745
754
for id , html_contents in id_to_html_contents .items ():
755
+ if len (html_contents ) > 4 :
756
+ print (f'Warning: Many elements for { id } : { len (html_contents )} ' )
757
+
746
758
if ids_pattern and not re .search (ids_pattern , id , flags = re .IGNORECASE ):
747
759
continue
748
760
0 commit comments