Commit e4009462 authored by Florian Jung's avatar Florian Jung
Browse files

Added Cursor::get_kind_spelling

parent 997d02a8
......@@ -22,6 +22,10 @@ clangmm::Cursor::Kind clangmm::Cursor::get_kind() const {
return static_cast<Kind>(clang_getCursorKind(cx_cursor));
}
std::string clangmm::Cursor::get_kind_spelling() const {
return to_string(clang_getCursorKindSpelling(clang_getCursorKind(cx_cursor)));
}
bool clangmm::Cursor::is_similar_kind(Kind kind, Kind other_kind) {
auto is_function_or_method=[](Kind kind) {
if(kind==Kind::FunctionDecl || kind==Kind::CXXMethod || kind==Kind::FunctionTemplate)
......
......@@ -191,6 +191,7 @@ namespace clangmm {
Cursor() { cx_cursor=clang_getNullCursor(); }
Cursor(const CXCursor &cx_cursor) : cx_cursor(cx_cursor) {}
Kind get_kind() const;
std::string get_kind_spelling() const;
static bool is_similar_kind(Kind kind, Kind other_kind);
Type get_type() const;
SourceLocation get_source_location() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment