Update PCH handling (#172)

This commit is contained in:
ykiko
2025-08-10 22:31:00 +08:00
committed by GitHub
parent 3615c5a194
commit a738ad536c
37 changed files with 1076 additions and 679 deletions

View File

@@ -89,13 +89,28 @@ private:
private:
async::Task<json::Value> on_initialize(proto::InitializeParams params);
private:
async::Task<OpenFile*> add_document(std::string path, std::string content);
async::Task<> on_initialized(proto::InitializedParams);
async::Task<> build_pch(std::string file, std::string preamble);
async::Task<json::Value> on_shutdown(proto::ShutdownParams params);
async::Task<> on_exit(proto::ExitParams params);
private:
/// Load the cache info from disk.
void load_cache_info();
/// Save the cache info to disk.
void save_cache_info();
async::Task<bool> build_pch(std::string file, std::string preamble);
async::Task<> build_ast(std::string file, std::string content);
async::Task<OpenFile*> add_document(std::string path, std::string content);
private:
async::Task<> publish_diagnostics(std::string path, OpenFile* file);
async::Task<> on_did_open(proto::DidOpenTextDocumentParams params);
async::Task<> on_did_change(proto::DidChangeTextDocumentParams params);