|
|
|
|
@ -26,10 +26,10 @@ clangmm::Token::Kind clangmm::Token::get_kind() const {
|
|
|
|
|
|
|
|
|
|
bool clangmm::Token::is_identifier() const { |
|
|
|
|
auto token_kind = get_kind(); |
|
|
|
|
auto cursor = get_cursor(); |
|
|
|
|
if(token_kind == clangmm::Token::Kind::Identifier && cursor.is_valid_kind()) |
|
|
|
|
if(token_kind == clangmm::Token::Kind::Identifier) |
|
|
|
|
return true; |
|
|
|
|
else if(token_kind == clangmm::Token::Kind::Keyword && cursor.is_valid_kind()) { |
|
|
|
|
auto cursor = get_cursor(); |
|
|
|
|
if(token_kind == clangmm::Token::Kind::Keyword && cursor.is_valid_kind()) { |
|
|
|
|
auto spelling = get_spelling(); |
|
|
|
|
if(spelling == "operator" || (spelling == "bool" && get_cursor().get_spelling() == "operator bool")) |
|
|
|
|
return true; |
|
|
|
|
|