c/clang:comment range

This commit is contained in:
luoliwoshang
2024-09-09 18:35:52 +08:00
parent 735953a262
commit 2b8d2b0026
2 changed files with 17 additions and 0 deletions

View File

@@ -117,6 +117,10 @@ CXString wrap_clang_getCursorDisplayName(CXCursor *cur) { return clang_getCursor
unsigned wrap_clang_Cursor_isVariadic(CXCursor *cur) { return clang_Cursor_isVariadic(*cur); } unsigned wrap_clang_Cursor_isVariadic(CXCursor *cur) { return clang_Cursor_isVariadic(*cur); }
void wrap_clang_Cursor_getCommentRange(CXCursor *cur, CXSourceRange *range) {
*range = clang_Cursor_getCommentRange(*cur);
}
CXString wrap_clang_Cursor_getRawCommentText(CXCursor *cursor) { return clang_Cursor_getRawCommentText(*cursor); } CXString wrap_clang_Cursor_getRawCommentText(CXCursor *cursor) { return clang_Cursor_getRawCommentText(*cursor); }
CXString wrap_clang_Cursor_getMangling(CXCursor *cur) { return clang_Cursor_getMangling(*cur); } CXString wrap_clang_Cursor_getMangling(CXCursor *cur) { return clang_Cursor_getMangling(*cur); }

View File

@@ -2219,6 +2219,19 @@ func (*Cursor) wrapIsVariadic() (ret c.Uint) { return 0 }
func (c Cursor) IsVariadic() (ret c.Uint) { return c.wrapIsVariadic() } func (c Cursor) IsVariadic() (ret c.Uint) { return c.wrapIsVariadic() }
/**
* Given a cursor that represents a declaration, return the associated
* comment's source range. The range may include multiple consecutive comments
* with whitespace in between.
*/
// llgo:link (*Cursor).wrapCommentRange C.wrap_clang_Cursor_getCommentRange
func (c *Cursor) wrapCommentRange(ret *SourceRange) {}
func (c Cursor) CommentRange() (loc SourceRange) {
c.wrapCommentRange(&loc)
return
}
/** /**
* Given a cursor that represents a declaration, return the associated * Given a cursor that represents a declaration, return the associated
* comment text, including comment markers. * comment text, including comment markers.