示例#1
0
文件: main.cpp 项目: 0x163mL/jazzy
void printXMLFromTU(CXTranslationUnit tu)
{
    printf("<?xml version=\"1.0\"?>\n<jazz>");
    clang_visitChildrenWithBlock(clang_getTranslationUnitCursor(tu), ^enum CXChildVisitResult(CXCursor cursor, CXCursor parent) {
        CXComment comment = clang_Cursor_getParsedComment(cursor);
        if (clang_Comment_getKind(comment) == CXComment_FullComment) {
            printf("%s\n", clang_getCString(clang_FullComment_getAsXML(comment)));
        }
        return CXChildVisit_Recurse;
    });
示例#2
0
SEXP R_clang_Comment_getKind(SEXP r_Comment)
{
    SEXP r_ans = R_NilValue;
    CXComment Comment = * GET_REF(r_Comment, CXComment);
    
    enum CXCommentKind ans;
    ans = clang_Comment_getKind(Comment);
    
    r_ans = Renum_convert_CXCommentKind(ans) ;
    
    return(r_ans);
}