有没有办法使用libclang检测匿名枚举而不依赖拼写名称中的文本?python绑定(bind)到libclang包括使用clang.cindex.Cursor.is_anonymous检测C/C++结构或union是否匿名的功能,最终调用clang_Cursor_isAnonymous.以下示例演示了该问题。importsysfromclang.cindeximport*defnodeinfo(n):return(n.kind,n.is_anonymous(),n.spelling,n.type.spelling)idx=Index.create()#translationunitp