mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
884 B
26 lines
884 B
#ifndef TOKENS_H_ |
|
#define TOKENS_H_ |
|
#include <clang-c/Index.h> |
|
#include "SourceRange.h" |
|
#include "Token.h" |
|
#include <unordered_map> |
|
#include <vector> |
|
|
|
namespace clangmm { |
|
class Tokens : public std::vector<clangmm::Token> { |
|
friend class TranslationUnit; |
|
friend class Diagnostic; |
|
Tokens(CXTranslationUnit &cx_tu, const SourceRange &range); |
|
public: |
|
~Tokens(); |
|
std::vector<std::pair<clangmm::Offset, clangmm::Offset> > get_similar_token_offsets(Cursor::Kind kind, |
|
const std::string &spelling, |
|
const std::string &usr); |
|
private: |
|
CXToken *cx_tokens; |
|
unsigned num_tokens; |
|
std::vector<CXCursor> cx_cursors; |
|
CXTranslationUnit& cx_tu; |
|
}; |
|
} // namespace clangmm |
|
#endif // TOKENS_H_
|
|
|