MLIR  19.0.0git
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
Protocol.h File Reference
#include "mlir/Support/LLVM.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <bitset>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  mlir::lsp::LSPError
 This class models an LSP error as an llvm::Error. More...
 
class  mlir::lsp::URIForFile
 URI in "file" scheme for a file. More...
 
struct  mlir::lsp::ClientCapabilities
 
struct  mlir::lsp::ClientInfo
 
struct  mlir::lsp::InitializeParams
 
struct  mlir::lsp::NoParams
 
struct  mlir::lsp::TextDocumentItem
 
struct  mlir::lsp::TextDocumentIdentifier
 
struct  mlir::lsp::VersionedTextDocumentIdentifier
 
struct  mlir::lsp::Position
 
struct  mlir::lsp::Range
 
struct  mlir::lsp::Location
 
struct  mlir::lsp::TextDocumentPositionParams
 
struct  mlir::lsp::ReferenceContext
 
struct  mlir::lsp::ReferenceParams
 
struct  mlir::lsp::DidOpenTextDocumentParams
 
struct  mlir::lsp::DidCloseTextDocumentParams
 
struct  mlir::lsp::TextDocumentContentChangeEvent
 
struct  mlir::lsp::DidChangeTextDocumentParams
 
struct  mlir::lsp::MarkupContent
 
struct  mlir::lsp::Hover
 
struct  mlir::lsp::DocumentSymbol
 Represents programming constructs like variables, classes, interfaces etc. More...
 
struct  mlir::lsp::DocumentSymbolParams
 
struct  mlir::lsp::DiagnosticRelatedInformation
 Represents a related message and source code location for a diagnostic. More...
 
struct  mlir::lsp::Diagnostic
 
struct  mlir::lsp::PublishDiagnosticsParams
 
struct  mlir::lsp::TextEdit
 
struct  mlir::lsp::CompletionItem
 
struct  mlir::lsp::CompletionList
 Represents a collection of completion items to be presented in the editor. More...
 
struct  mlir::lsp::CompletionContext
 
struct  mlir::lsp::CompletionParams
 
struct  mlir::lsp::ParameterInformation
 A single parameter of a particular signature. More...
 
struct  mlir::lsp::SignatureInformation
 Represents the signature of something callable. More...
 
struct  mlir::lsp::SignatureHelp
 Represents the signature of a callable. More...
 
struct  mlir::lsp::DocumentLinkParams
 Parameters for the document link request. More...
 
struct  mlir::lsp::DocumentLink
 A range in a text document that links to an internal or external resource, like another text document or a web site. More...
 
struct  mlir::lsp::InlayHintsParams
 A parameter literal used in inlay hint requests. More...
 
struct  mlir::lsp::InlayHint
 Inlay hint information. More...
 
struct  mlir::lsp::CodeActionContext
 
struct  mlir::lsp::CodeActionParams
 
struct  mlir::lsp::WorkspaceEdit
 
struct  mlir::lsp::CodeAction
 A code action represents a change that can be performed in code, e.g. More...
 
struct  llvm::format_provider< mlir::lsp::Position >
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::lsp
 
 llvm
 Include the generated interface declarations.
 

Typedefs

using mlir::lsp::InitializedParams = NoParams
 
using mlir::lsp::CompletionItemKindBitset = std::bitset< kCompletionItemKindMax+1 >
 

Enumerations

enum class  mlir::lsp::ErrorCode {
  mlir::lsp::ParseError = -32700 , mlir::lsp::InvalidRequest = -32600 , mlir::lsp::MethodNotFound = -32601 , mlir::lsp::InvalidParams = -32602 ,
  mlir::lsp::InternalError = -32603 , mlir::lsp::ServerNotInitialized = -32002 , mlir::lsp::UnknownErrorCode = -32001 , mlir::lsp::RequestCancelled = -32800 ,
  mlir::lsp::ContentModified = -32801 , mlir::lsp::RequestFailed = -32803
}
 
enum class  mlir::lsp::TextDocumentSyncKind { mlir::lsp::None = 0 , mlir::lsp::Full = 1 , mlir::lsp::Incremental = 2 }
 Defines how the host (editor) should sync document changes to the language server. More...
 
enum class  mlir::lsp::TraceLevel { mlir::lsp::Off = 0 , mlir::lsp::Messages = 1 , mlir::lsp::Verbose = 2 }
 
enum class  mlir::lsp::MarkupKind { mlir::lsp::PlainText , mlir::lsp::Markdown }
 Describes the content type that a client supports in various result literals like Hover. More...
 
enum class  mlir::lsp::SymbolKind {
  mlir::lsp::File = 1 , mlir::lsp::Module = 2 , mlir::lsp::Namespace = 3 , mlir::lsp::Package = 4 ,
  mlir::lsp::Class = 5 , mlir::lsp::Method = 6 , mlir::lsp::Property = 7 , mlir::lsp::Field = 8 ,
  mlir::lsp::Constructor = 9 , mlir::lsp::Enum = 10 , mlir::lsp::Interface = 11 , mlir::lsp::Function = 12 ,
  mlir::lsp::Variable = 13 , mlir::lsp::Constant = 14 , mlir::lsp::String = 15 , mlir::lsp::Number = 16 ,
  mlir::lsp::Boolean = 17 , mlir::lsp::Array = 18 , mlir::lsp::Object = 19 , mlir::lsp::Key = 20 ,
  mlir::lsp::Null = 21 , mlir::lsp::EnumMember = 22 , mlir::lsp::Struct = 23 , mlir::lsp::Event = 24 ,
  mlir::lsp::Operator = 25 , mlir::lsp::TypeParameter = 26
}
 
enum class  mlir::lsp::DiagnosticSeverity {
  mlir::lsp::Undetermined = 0 , mlir::lsp::Error = 1 , mlir::lsp::Warning = 2 , mlir::lsp::Information = 3 ,
  mlir::lsp::Hint = 4
}
 
enum class  mlir::lsp::CompletionItemKind {
  mlir::lsp::Missing = 0 , mlir::lsp::Text = 1 , mlir::lsp::Method = 2 , mlir::lsp::Function = 3 ,
  mlir::lsp::Constructor = 4 , mlir::lsp::Field = 5 , mlir::lsp::Variable = 6 , mlir::lsp::Class = 7 ,
  mlir::lsp::Interface = 8 , mlir::lsp::Module = 9 , mlir::lsp::Property = 10 , mlir::lsp::Unit = 11 ,
  mlir::lsp::Value = 12 , mlir::lsp::Enum = 13 , mlir::lsp::Keyword = 14 , mlir::lsp::Snippet = 15 ,
  mlir::lsp::Color = 16 , mlir::lsp::File = 17 , mlir::lsp::Reference = 18 , mlir::lsp::Folder = 19 ,
  mlir::lsp::EnumMember = 20 , mlir::lsp::Constant = 21 , mlir::lsp::Struct = 22 , mlir::lsp::Event = 23 ,
  mlir::lsp::Operator = 24 , mlir::lsp::TypeParameter = 25
}
 The kind of a completion entry. More...
 
enum class  mlir::lsp::InsertTextFormat { mlir::lsp::Missing = 0 , mlir::lsp::PlainText = 1 , mlir::lsp::Snippet = 2 }
 Defines whether the insert text in a completion item should be interpreted as plain text or a snippet. More...
 
enum class  mlir::lsp::CompletionTriggerKind { mlir::lsp::Invoked = 1 , mlir::lsp::TriggerCharacter = 2 , mlir::lsp::TriggerTriggerForIncompleteCompletions = 3 }
 
enum class  mlir::lsp::InlayHintKind { mlir::lsp::Type = 1 , mlir::lsp::Parameter = 2 }
 Inlay hint kinds. More...
 

Functions

llvm::json::Value mlir::lsp::toJSON (const URIForFile &value)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, URIForFile &result, llvm::json::Path path)
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const URIForFile &value)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, ClientCapabilities &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, ClientInfo &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, TraceLevel &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, InitializeParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &, NoParams &, llvm::json::Path)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, TextDocumentItem &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const TextDocumentIdentifier &value)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, TextDocumentIdentifier &result, llvm::json::Path path)
 
llvm::json::Value mlir::lsp::toJSON (const VersionedTextDocumentIdentifier &value)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, VersionedTextDocumentIdentifier &result, llvm::json::Path path)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, Position &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const Position &value)
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const Position &value)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, Range &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const Range &value)
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const Range &value)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, Location &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const Location &value)
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const Location &value)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, TextDocumentPositionParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, ReferenceContext &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, ReferenceParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, DidOpenTextDocumentParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, DidCloseTextDocumentParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, TextDocumentContentChangeEvent &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, DidChangeTextDocumentParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, MarkupKind kind)
 
llvm::json::Value mlir::lsp::toJSON (const MarkupContent &mc)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const Hover &hover)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const DocumentSymbol &symbol)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, DocumentSymbolParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, DiagnosticRelatedInformation &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const DiagnosticRelatedInformation &info)
 
llvm::json::Value mlir::lsp::toJSON (const Diagnostic &diag)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, Diagnostic &result, llvm::json::Path path)
 
llvm::json::Value mlir::lsp::toJSON (const PublishDiagnosticsParams &params)
 Add support for JSON serialization. More...
 
bool mlir::lsp::operator== (const TextEdit &lhs, const TextEdit &rhs)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, TextEdit &result, llvm::json::Path path)
 
llvm::json::Value mlir::lsp::toJSON (const TextEdit &value)
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const TextEdit &value)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, CompletionItemKind &result, llvm::json::Path path)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, CompletionItemKindBitset &result, llvm::json::Path path)
 
CompletionItemKind mlir::lsp::adjustKindToCapability (CompletionItemKind kind, CompletionItemKindBitset &supportedCompletionItemKinds)
 
llvm::json::Value mlir::lsp::toJSON (const CompletionItem &value)
 Add support for JSON serialization. More...
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const CompletionItem &value)
 
bool mlir::lsp::operator< (const CompletionItem &lhs, const CompletionItem &rhs)
 
llvm::json::Value mlir::lsp::toJSON (const CompletionList &value)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, CompletionContext &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, CompletionParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const ParameterInformation &value)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const SignatureInformation &value)
 Add support for JSON serialization. More...
 
raw_ostream & mlir::lsp::operator<< (raw_ostream &os, const SignatureInformation &value)
 
llvm::json::Value mlir::lsp::toJSON (const SignatureHelp &value)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, DocumentLinkParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const DocumentLink &value)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, InlayHintsParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const InlayHint &)
 Add support for JSON serialization. More...
 
bool mlir::lsp::operator== (const InlayHint &lhs, const InlayHint &rhs)
 
bool mlir::lsp::operator< (const InlayHint &lhs, const InlayHint &rhs)
 
llvm::raw_ostream & mlir::lsp::operator<< (llvm::raw_ostream &os, InlayHintKind value)
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, CodeActionContext &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, CodeActionParams &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
bool mlir::lsp::fromJSON (const llvm::json::Value &value, WorkspaceEdit &result, llvm::json::Path path)
 Add support for JSON serialization. More...
 
llvm::json::Value mlir::lsp::toJSON (const WorkspaceEdit &value)
 
llvm::json::Value mlir::lsp::toJSON (const CodeAction &)
 Add support for JSON serialization. More...
 

Variables

constexpr auto mlir::lsp::kCompletionItemKindMin
 
constexpr auto mlir::lsp::kCompletionItemKindMax