Parse using options=clang.TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD
Function:
def get_includes(node):
includes = []
for child_node in valid_children(node):
child_cursor = child_node["cursor"]
if child_cursor.kind.name == "INCLUSION_DIRECTIVE":
includes.append(child_cursor.displayname)
return includes
How to do:
options=clang.TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD
Function: