context.h 792 B

1234567891011121314151617181920212223242526
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_LANGUAGE_SERVER_CONTEXT_H_
  5. #define CARBON_TOOLCHAIN_LANGUAGE_SERVER_CONTEXT_H_
  6. #include "clang-tools-extra/clangd/Protocol.h"
  7. #include "clang-tools-extra/clangd/support/Function.h"
  8. #include "common/map.h"
  9. namespace Carbon::LanguageServer {
  10. // Context for LSP call handling.
  11. class Context {
  12. public:
  13. auto files() -> Map<std::string, std::string>& { return files_; }
  14. private:
  15. // Content of files managed by the language client.
  16. Map<std::string, std::string> files_;
  17. };
  18. } // namespace Carbon::LanguageServer
  19. #endif // CARBON_TOOLCHAIN_LANGUAGE_SERVER_CONTEXT_H_