context.h 709 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 <string>
  7. #include "common/map.h"
  8. namespace Carbon::LanguageServer {
  9. // Context for LSP call handling.
  10. class Context {
  11. public:
  12. auto files() -> Map<std::string, std::string>& { return files_; }
  13. private:
  14. // Content of files managed by the language client.
  15. Map<std::string, std::string> files_;
  16. };
  17. } // namespace Carbon::LanguageServer
  18. #endif // CARBON_TOOLCHAIN_LANGUAGE_SERVER_CONTEXT_H_