mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-25 09:57:48 +00:00
32 lines
747 B
C++
32 lines
747 B
C++
#ifndef TRANSLATIONUNIT_H_
|
|
#define TRANSLATIONUNIT_H_
|
|
#include <clang-c/Index.h>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
#include <memory>
|
|
#include "Index.h"
|
|
#include "Cursor.h"
|
|
#include "../language_server_api.h"
|
|
|
|
namespace clang {
|
|
class TranslationUnit {
|
|
public:
|
|
TranslationUnit(Index* index,
|
|
const std::string& filepath,
|
|
const std::vector<std::string>& arguments,
|
|
std::vector<CXUnsavedFile> unsaved_files,
|
|
unsigned flags);
|
|
~TranslationUnit();
|
|
|
|
bool did_fail = false;
|
|
|
|
void ReparseTranslationUnit(std::vector<CXUnsavedFile>& unsaved);
|
|
|
|
Cursor document_cursor() const;
|
|
|
|
CXTranslationUnit cx_tu;
|
|
};
|
|
} // namespace clang
|
|
#endif // TRANSLATIONUNIT_H_
|