MLIR
18.0.0git
|
Classes | |
class | CompilationDatabase |
This class contains a collection of compilation information for files provided to the language server, such as the available include directories. More... | |
class | Logger |
This class represents the main interface for logging, and allows for filtering logging based on different levels of severity or significance. More... | |
class | LSPError |
This class models an LSP error as an llvm::Error. More... | |
class | URIForFile |
URI in "file" scheme for a file. More... | |
struct | ClientCapabilities |
struct | ClientInfo |
struct | InitializeParams |
struct | NoParams |
struct | TextDocumentItem |
struct | TextDocumentIdentifier |
struct | VersionedTextDocumentIdentifier |
struct | Position |
struct | Range |
struct | Location |
struct | TextDocumentPositionParams |
struct | ReferenceContext |
struct | ReferenceParams |
struct | DidOpenTextDocumentParams |
struct | DidCloseTextDocumentParams |
struct | TextDocumentContentChangeEvent |
struct | DidChangeTextDocumentParams |
struct | MarkupContent |
struct | Hover |
struct | DocumentSymbol |
Represents programming constructs like variables, classes, interfaces etc. More... | |
struct | DocumentSymbolParams |
struct | DiagnosticRelatedInformation |
Represents a related message and source code location for a diagnostic. More... | |
struct | Diagnostic |
struct | PublishDiagnosticsParams |
struct | TextEdit |
struct | CompletionItem |
struct | CompletionList |
Represents a collection of completion items to be presented in the editor. More... | |
struct | CompletionContext |
struct | CompletionParams |
struct | ParameterInformation |
A single parameter of a particular signature. More... | |
struct | SignatureInformation |
Represents the signature of something callable. More... | |
struct | SignatureHelp |
Represents the signature of a callable. More... | |
struct | DocumentLinkParams |
Parameters for the document link request. More... | |
struct | 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 | InlayHintsParams |
A parameter literal used in inlay hint requests. More... | |
struct | InlayHint |
Inlay hint information. More... | |
struct | CodeActionContext |
struct | CodeActionParams |
struct | WorkspaceEdit |
struct | CodeAction |
A code action represents a change that can be performed in code, e.g. More... | |
struct | SourceMgrInclude |
This class represents a single include within a root file. More... | |
class | JSONTransport |
A transport class that performs the JSON-RPC communication with the LSP client. More... | |
class | MessageHandler |
A handler used to process the incoming transport messages. More... | |
class | MLIRServer |
This class implements all of the MLIR related functionality necessary for a language server. More... | |
struct | MLIRConvertBytecodeParams |
This class represents the parameters used when converting between MLIR's bytecode and textual format. More... | |
struct | MLIRConvertBytecodeResult |
This class represents the result of converting between MLIR's bytecode and textual format. More... | |
class | PDLLServer |
This class implements all of the PDLL related functionality necessary for a language server. More... | |
struct | PDLLViewOutputParams |
Represents the parameters used when viewing the output of a PDLL file. More... | |
struct | PDLLViewOutputResult |
Represents the result of viewing the output of a PDLL file. More... | |
class | TableGenServer |
This class implements all of the TableGen related functionality necessary for a language server. More... | |
Typedefs | |
using | InitializedParams = NoParams |
using | CompletionItemKindBitset = std::bitset< kCompletionItemKindMax+1 > |
template<typename T > | |
using | Callback = llvm::unique_function< void(llvm::Expected< T >)> |
A Callback<T> is a void function that accepts Expected<T>. More... | |
template<typename T > | |
using | OutgoingNotification = llvm::unique_function< void(const T &)> |
An OutgoingNotification<T> is a function used for outgoing notifications send to the client. More... | |
Enumerations | |
enum class | ErrorCode { ParseError = -32700 , InvalidRequest = -32600 , MethodNotFound = -32601 , InvalidParams = -32602 , InternalError = -32603 , ServerNotInitialized = -32002 , UnknownErrorCode = -32001 , RequestCancelled = -32800 , ContentModified = -32801 , RequestFailed = -32803 } |
enum class | TextDocumentSyncKind { None = 0 , Full = 1 , Incremental = 2 } |
Defines how the host (editor) should sync document changes to the language server. More... | |
enum class | TraceLevel { Off = 0 , Messages = 1 , Verbose = 2 } |
enum class | MarkupKind { PlainText , Markdown } |
Describes the content type that a client supports in various result literals like Hover . More... | |
enum class | SymbolKind { File = 1 , Module = 2 , Namespace = 3 , Package = 4 , Class = 5 , Method = 6 , Property = 7 , Field = 8 , Constructor = 9 , Enum = 10 , Interface = 11 , Function = 12 , Variable = 13 , Constant = 14 , String = 15 , Number = 16 , Boolean = 17 , Array = 18 , Object = 19 , Key = 20 , Null = 21 , EnumMember = 22 , Struct = 23 , Event = 24 , Operator = 25 , TypeParameter = 26 } |
enum class | DiagnosticSeverity { Undetermined = 0 , Error = 1 , Warning = 2 , Information = 3 , Hint = 4 } |
enum class | CompletionItemKind { Missing = 0 , Text = 1 , Method = 2 , Function = 3 , Constructor = 4 , Field = 5 , Variable = 6 , Class = 7 , Interface = 8 , Module = 9 , Property = 10 , Unit = 11 , Value = 12 , Enum = 13 , Keyword = 14 , Snippet = 15 , Color = 16 , File = 17 , Reference = 18 , Folder = 19 , EnumMember = 20 , Constant = 21 , Struct = 22 , Event = 23 , Operator = 24 , TypeParameter = 25 } |
The kind of a completion entry. More... | |
enum class | InsertTextFormat { Missing = 0 , PlainText = 1 , Snippet = 2 } |
Defines whether the insert text in a completion item should be interpreted as plain text or a snippet. More... | |
enum class | CompletionTriggerKind { Invoked = 1 , TriggerCharacter = 2 , TriggerTriggerForIncompleteCompletions = 3 } |
enum class | InlayHintKind { Type = 1 , Parameter = 2 } |
Inlay hint kinds. More... | |
enum | JSONStreamStyle { Standard , Delimited } |
The encoding style of the JSON-RPC messages (both input and output). More... | |
enum class | PDLLViewOutputKind { AST , MLIR , CPP } |
The type of output to view from PDLL. More... | |
Functions | |
llvm::json::Value | toJSON (const URIForFile &value) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, URIForFile &result, llvm::json::Path path) |
raw_ostream & | operator<< (raw_ostream &os, const URIForFile &value) |
bool | fromJSON (const llvm::json::Value &value, ClientCapabilities &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, ClientInfo &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, TraceLevel &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, InitializeParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &, NoParams &, llvm::json::Path) |
bool | fromJSON (const llvm::json::Value &value, TextDocumentItem &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const TextDocumentIdentifier &value) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, TextDocumentIdentifier &result, llvm::json::Path path) |
llvm::json::Value | toJSON (const VersionedTextDocumentIdentifier &value) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, VersionedTextDocumentIdentifier &result, llvm::json::Path path) |
bool | fromJSON (const llvm::json::Value &value, Position &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const Position &value) |
raw_ostream & | operator<< (raw_ostream &os, const Position &value) |
bool | fromJSON (const llvm::json::Value &value, Range &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const Range &value) |
raw_ostream & | operator<< (raw_ostream &os, const Range &value) |
bool | fromJSON (const llvm::json::Value &value, Location &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const Location &value) |
raw_ostream & | operator<< (raw_ostream &os, const Location &value) |
bool | fromJSON (const llvm::json::Value &value, TextDocumentPositionParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, ReferenceContext &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, ReferenceParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, DidOpenTextDocumentParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, DidCloseTextDocumentParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, TextDocumentContentChangeEvent &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, DidChangeTextDocumentParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
raw_ostream & | operator<< (raw_ostream &os, MarkupKind kind) |
llvm::json::Value | toJSON (const MarkupContent &mc) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const Hover &hover) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const DocumentSymbol &symbol) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, DocumentSymbolParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, DiagnosticRelatedInformation &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const DiagnosticRelatedInformation &info) |
llvm::json::Value | toJSON (const Diagnostic &diag) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, Diagnostic &result, llvm::json::Path path) |
llvm::json::Value | toJSON (const PublishDiagnosticsParams ¶ms) |
Add support for JSON serialization. More... | |
bool | operator== (const TextEdit &lhs, const TextEdit &rhs) |
bool | fromJSON (const llvm::json::Value &value, TextEdit &result, llvm::json::Path path) |
llvm::json::Value | toJSON (const TextEdit &value) |
raw_ostream & | operator<< (raw_ostream &os, const TextEdit &value) |
bool | fromJSON (const llvm::json::Value &value, CompletionItemKind &result, llvm::json::Path path) |
bool | fromJSON (const llvm::json::Value &value, CompletionItemKindBitset &result, llvm::json::Path path) |
CompletionItemKind | adjustKindToCapability (CompletionItemKind kind, CompletionItemKindBitset &supportedCompletionItemKinds) |
llvm::json::Value | toJSON (const CompletionItem &value) |
Add support for JSON serialization. More... | |
raw_ostream & | operator<< (raw_ostream &os, const CompletionItem &value) |
bool | operator< (const CompletionItem &lhs, const CompletionItem &rhs) |
llvm::json::Value | toJSON (const CompletionList &value) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, CompletionContext &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, CompletionParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const ParameterInformation &value) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const SignatureInformation &value) |
Add support for JSON serialization. More... | |
raw_ostream & | operator<< (raw_ostream &os, const SignatureInformation &value) |
llvm::json::Value | toJSON (const SignatureHelp &value) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, DocumentLinkParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const DocumentLink &value) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, InlayHintsParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const InlayHint &) |
Add support for JSON serialization. More... | |
bool | operator== (const InlayHint &lhs, const InlayHint &rhs) |
bool | operator< (const InlayHint &lhs, const InlayHint &rhs) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &os, InlayHintKind value) |
bool | fromJSON (const llvm::json::Value &value, CodeActionContext &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, CodeActionParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, WorkspaceEdit &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const WorkspaceEdit &value) |
llvm::json::Value | toJSON (const CodeAction &) |
Add support for JSON serialization. More... | |
SMRange | convertTokenLocToRange (SMLoc loc, StringRef identifierChars="") |
Returns the range of a lexical token given a SMLoc corresponding to the start of an token location. More... | |
std::optional< std::string > | extractSourceDocComment (llvm::SourceMgr &sourceMgr, SMLoc loc) |
Extract a documentation comment for the given location within the source manager. More... | |
bool | contains (SMRange range, SMLoc loc) |
Returns true if the given range contains the given source location. More... | |
void | gatherIncludeFiles (llvm::SourceMgr &sourceMgr, SmallVectorImpl< SourceMgrInclude > &includes) |
Given a source manager, gather all of the processed include files. More... | |
LogicalResult | runMlirLSPServer (MLIRServer &server, JSONTransport &transport) |
Run the main loop of the LSP server using the given MLIR server and transport. More... | |
bool | fromJSON (const llvm::json::Value &value, MLIRConvertBytecodeParams &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
llvm::json::Value | toJSON (const MLIRConvertBytecodeResult &value) |
Add support for JSON serialization. More... | |
LogicalResult | runPdllLSPServer (PDLLServer &server, JSONTransport &transport) |
Run the main loop of the LSP server using the given PDLL server and transport. More... | |
bool | fromJSON (const llvm::json::Value &value, PDLLViewOutputKind &result, llvm::json::Path path) |
Add support for JSON serialization. More... | |
bool | fromJSON (const llvm::json::Value &value, PDLLViewOutputParams &result, llvm::json::Path path) |
llvm::json::Value | toJSON (const PDLLViewOutputResult &value) |
Add support for JSON serialization. More... | |
LogicalResult | runTableGenLSPServer (TableGenServer &server, JSONTransport &transport) |
Run the main loop of the LSP server using the given TableGen server and transport. More... | |
Variables | |
constexpr auto | kCompletionItemKindMin |
constexpr auto | kCompletionItemKindMax |
using mlir::lsp::Callback = typedef llvm::unique_function<void(llvm::Expected<T>)> |
A Callback<T> is a void function that accepts Expected<T>.
This is accepted by functions that logically return T.
Definition at line 96 of file Transport.h.
using mlir::lsp::CompletionItemKindBitset = typedef std::bitset<kCompletionItemKindMax + 1> |
Definition at line 793 of file Protocol.h.
using mlir::lsp::InitializedParams = typedef NoParams |
Definition at line 223 of file Protocol.h.
using mlir::lsp::OutgoingNotification = typedef llvm::unique_function<void(const T &)> |
An OutgoingNotification<T> is a function used for outgoing notifications send to the client.
Definition at line 101 of file Transport.h.
|
strong |
The kind of a completion entry.
Definition at line 758 of file Protocol.h.
|
strong |
Definition at line 903 of file Protocol.h.
|
strong |
Enumerator | |
---|---|
Undetermined | It is up to the client to interpret diagnostics as error, warning, info or hint. |
Error | |
Warning | |
Information | |
Hint |
Definition at line 670 of file Protocol.h.
|
strong |
Enumerator | |
---|---|
ParseError | |
InvalidRequest | |
MethodNotFound | |
InvalidParams | |
InternalError | |
ServerNotInitialized | |
UnknownErrorCode | |
RequestCancelled | |
ContentModified | |
RequestFailed |
Definition at line 42 of file Protocol.h.
|
strong |
Inlay hint kinds.
Definition at line 1072 of file Protocol.h.
|
strong |
Defines whether the insert text in a completion item should be interpreted as plain text or a snippet.
Definition at line 807 of file Protocol.h.
The encoding style of the JSON-RPC messages (both input and output).
Enumerator | |
---|---|
Standard | Encoding per the LSP specification, with mandatory Content-Length header. |
Delimited | Messages are delimited by a '// --—' line. Comment lines start with //. |
Definition at line 39 of file Transport.h.
|
strong |
Describes the content type that a client supports in various result literals like Hover
.
Enumerator | |
---|---|
PlainText | |
Markdown |
Definition at line 522 of file Protocol.h.
|
strong |
The type of output to view from PDLL.
Enumerator | |
---|---|
AST | |
MLIR | |
CPP |
Definition at line 32 of file Protocol.h.
|
strong |
Definition at line 559 of file Protocol.h.
|
strong |
Defines how the host (editor) should sync document changes to the language server.
Definition at line 61 of file Protocol.h.
|
strong |
Enumerator | |
---|---|
Off | |
Messages | |
Verbose |
Definition at line 190 of file Protocol.h.
CompletionItemKind mlir::lsp::adjustKindToCapability | ( | CompletionItemKind | kind, |
CompletionItemKindBitset & | supportedCompletionItemKinds | ||
) |
Definition at line 732 of file Protocol.cpp.
bool mlir::lsp::contains | ( | SMRange | range, |
SMLoc | loc | ||
) |
Returns true if the given range contains the given source location.
Note that this has different behavior than SMRange because it is inclusive of the end location.
Definition at line 114 of file SourceMgrUtils.cpp.
Referenced by lexLocStringTok(), and parseFilePathFromURI().
SMRange mlir::lsp::convertTokenLocToRange | ( | SMLoc | loc, |
StringRef | identifierChars = "" |
||
) |
Returns the range of a lexical token given a SMLoc corresponding to the start of an token location.
The range is computed heuristically, and supports identifier-like tokens, strings, etc.
Definition at line 47 of file SourceMgrUtils.cpp.
References lexLocStringTok().
Referenced by convertTokenLocToRange().
std::optional< std::string > mlir::lsp::extractSourceDocComment | ( | llvm::SourceMgr & | sourceMgr, |
SMLoc | loc | ||
) |
Extract a documentation comment for the given location within the source manager.
Returns std::nullopt if no comment could be computed.
Definition at line 71 of file SourceMgrUtils.cpp.
Referenced by getDocumentationFor().
|
inline |
Definition at line 220 of file Protocol.h.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
ClientCapabilities & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 275 of file Protocol.cpp.
References mlir::lsp::ClientCapabilities::codeActionStructure, and mlir::lsp::ClientCapabilities::hierarchicalDocumentSymbol.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
ClientInfo & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 301 of file Protocol.cpp.
References mlir::lsp::ClientInfo::name, and mlir::lsp::ClientInfo::version.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
CodeActionContext & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 971 of file Protocol.cpp.
References mlir::lsp::CodeActionContext::diagnostics, and mlir::lsp::CodeActionContext::only.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
CodeActionParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 984 of file Protocol.cpp.
References mlir::lsp::CodeActionParams::context, mlir::lsp::CodeActionParams::range, and mlir::lsp::CodeActionParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
CompletionContext & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 826 of file Protocol.cpp.
References mapOptOrNull(), mlir::lsp::CompletionContext::triggerCharacter, and mlir::lsp::CompletionContext::triggerKind.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
CompletionItemKind & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 720 of file Protocol.cpp.
References Text, and TypeParameter.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
CompletionItemKindBitset & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 754 of file Protocol.cpp.
References fromJSON().
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
CompletionParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 841 of file Protocol.cpp.
References mlir::lsp::CompletionParams::context, and fromJSON().
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
Diagnostic & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 664 of file Protocol.cpp.
References mlir::lsp::Diagnostic::category, mapOptOrNull(), mlir::lsp::Diagnostic::message, mlir::lsp::Diagnostic::range, mlir::lsp::Diagnostic::relatedInformation, mlir::lsp::Diagnostic::severity, and mlir::lsp::Diagnostic::source.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
DiagnosticRelatedInformation & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 630 of file Protocol.cpp.
References mlir::lsp::DiagnosticRelatedInformation::location, and mlir::lsp::DiagnosticRelatedInformation::message.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
DidChangeTextDocumentParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 552 of file Protocol.cpp.
References mlir::lsp::DidChangeTextDocumentParams::contentChanges, and mlir::lsp::DidChangeTextDocumentParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
DidCloseTextDocumentParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 503 of file Protocol.cpp.
References mlir::lsp::DidCloseTextDocumentParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
DidOpenTextDocumentParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 492 of file Protocol.cpp.
References mlir::lsp::DidOpenTextDocumentParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
DocumentLinkParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 908 of file Protocol.cpp.
References mlir::lsp::DocumentLinkParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
DocumentSymbolParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 620 of file Protocol.cpp.
References mlir::lsp::DocumentSymbolParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
InitializeParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 335 of file Protocol.cpp.
References mlir::lsp::InitializeParams::capabilities, mlir::lsp::InitializeParams::clientInfo, mapOptOrNull(), and mlir::lsp::InitializeParams::trace.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
InlayHintsParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 929 of file Protocol.cpp.
References mlir::lsp::InlayHintsParams::range, and mlir::lsp::InlayHintsParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
Location & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 441 of file Protocol.cpp.
References mlir::lsp::Location::range, and mlir::lsp::Location::uri.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
MLIRConvertBytecodeParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 30 of file Protocol.cpp.
References mlir::lsp::MLIRConvertBytecodeParams::uri.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
PDLLViewOutputKind & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 45 of file Protocol.cpp.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
PDLLViewOutputParams & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 64 of file Protocol.cpp.
References mlir::lsp::PDLLViewOutputParams::kind, and mlir::lsp::PDLLViewOutputParams::uri.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
Position & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 398 of file Protocol.cpp.
References mlir::lsp::Position::character, and mlir::lsp::Position::line.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
Range & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 420 of file Protocol.cpp.
References mlir::lsp::Range::end, and mlir::lsp::Range::start.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
ReferenceContext & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 474 of file Protocol.cpp.
References mlir::lsp::ReferenceContext::includeDeclaration.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
ReferenceParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 480 of file Protocol.cpp.
References mlir::lsp::ReferenceParams::context, and fromJSON().
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
TextDocumentContentChangeEvent & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 544 of file Protocol.cpp.
References mlir::lsp::TextDocumentContentChangeEvent::range, mlir::lsp::TextDocumentContentChangeEvent::rangeLength, and mlir::lsp::TextDocumentContentChangeEvent::text.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
TextDocumentIdentifier & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 368 of file Protocol.cpp.
References mlir::lsp::TextDocumentIdentifier::uri.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
TextDocumentItem & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 352 of file Protocol.cpp.
References mlir::lsp::TextDocumentItem::languageId, mlir::lsp::TextDocumentItem::text, mlir::lsp::TextDocumentItem::uri, and mlir::lsp::TextDocumentItem::version.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
TextDocumentPositionParams & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 462 of file Protocol.cpp.
References mlir::lsp::TextDocumentPositionParams::position, and mlir::lsp::TextDocumentPositionParams::textDocument.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
TextEdit & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 697 of file Protocol.cpp.
References mlir::lsp::TextEdit::newText, and mlir::lsp::TextEdit::range.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
TraceLevel & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 316 of file Protocol.cpp.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
URIForFile & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 248 of file Protocol.cpp.
References mlir::lsp::URIForFile::fromURI().
Referenced by fromJSON(), mapOptOrNull(), and mlir::lsp::MessageHandler::parse().
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
VersionedTextDocumentIdentifier & | result, | ||
llvm::json::Path | path | ||
) |
Definition at line 387 of file Protocol.cpp.
References mlir::lsp::VersionedTextDocumentIdentifier::uri, and mlir::lsp::VersionedTextDocumentIdentifier::version.
bool mlir::lsp::fromJSON | ( | const llvm::json::Value & | value, |
WorkspaceEdit & | result, | ||
llvm::json::Path | path | ||
) |
Add support for JSON serialization.
Definition at line 995 of file Protocol.cpp.
References mlir::lsp::WorkspaceEdit::changes.
void mlir::lsp::gatherIncludeFiles | ( | llvm::SourceMgr & | sourceMgr, |
SmallVectorImpl< SourceMgrInclude > & | includes | ||
) |
Given a source manager, gather all of the processed include files.
These are assumed to be all of the files other than the main root file.
Definition at line 133 of file SourceMgrUtils.cpp.
References mlir::lsp::URIForFile::fromFile().
bool mlir::lsp::operator< | ( | const CompletionItem & | lhs, |
const CompletionItem & | rhs | ||
) |
Definition at line 805 of file Protocol.cpp.
References mlir::lsp::CompletionItem::label, and mlir::lsp::CompletionItem::sortText.
Definition at line 951 of file Protocol.cpp.
References mlir::lsp::InlayHint::kind, mlir::lsp::InlayHint::label, and mlir::lsp::InlayHint::position.
llvm::raw_ostream & mlir::lsp::operator<< | ( | llvm::raw_ostream & | os, |
InlayHintKind | value | ||
) |
Definition at line 956 of file Protocol.cpp.
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const CompletionItem & | value | ||
) |
Definition at line 800 of file Protocol.cpp.
References mlir::lsp::CompletionItem::label, and toJSON().
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const Location & | value | ||
) |
Definition at line 454 of file Protocol.cpp.
References mlir::lsp::Location::range, and mlir::lsp::Location::uri.
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const Position & | value | ||
) |
Definition at line 412 of file Protocol.cpp.
References mlir::lsp::Position::character, and mlir::lsp::Position::line.
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const Range & | value | ||
) |
Definition at line 433 of file Protocol.cpp.
References mlir::lsp::Range::end, and mlir::lsp::Range::start.
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const SignatureInformation & | value | ||
) |
Definition at line 883 of file Protocol.cpp.
References mlir::lsp::SignatureInformation::label, and toJSON().
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const TextEdit & | value | ||
) |
Definition at line 710 of file Protocol.cpp.
References mlir::lsp::TextEdit::newText, and mlir::lsp::TextEdit::range.
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
const URIForFile & | value | ||
) |
Definition at line 267 of file Protocol.cpp.
References mlir::lsp::URIForFile::uri().
raw_ostream & mlir::lsp::operator<< | ( | raw_ostream & | os, |
MarkupKind | kind | ||
) |
Definition at line 574 of file Protocol.cpp.
Definition at line 947 of file Protocol.cpp.
References mlir::lsp::InlayHint::kind, mlir::lsp::InlayHint::label, and mlir::lsp::InlayHint::position.
Definition at line 744 of file Protocol.h.
References mlir::lsp::TextEdit::newText, and mlir::lsp::TextEdit::range.
LogicalResult mlir::lsp::runMlirLSPServer | ( | MLIRServer & | server, |
JSONTransport & | transport | ||
) |
Run the main loop of the LSP server using the given MLIR server and transport.
Definition at line 285 of file LSPServer.cpp.
References mlir::lsp::Logger::error(), mlir::failure(), mlir::lsp::MessageHandler::method(), mlir::lsp::MessageHandler::notification(), mlir::lsp::MessageHandler::outgoingNotification(), mlir::lsp::JSONTransport::run(), and mlir::success().
Referenced by mlir::MlirLspServerMain().
LogicalResult mlir::lsp::runPdllLSPServer | ( | PDLLServer & | server, |
JSONTransport & | transport | ||
) |
Run the main loop of the LSP server using the given PDLL server and transport.
Definition at line 283 of file LSPServer.cpp.
References mlir::lsp::Logger::error(), mlir::failure(), mlir::lsp::MessageHandler::method(), mlir::lsp::MessageHandler::notification(), mlir::lsp::MessageHandler::outgoingNotification(), mlir::lsp::JSONTransport::run(), and mlir::success().
Referenced by mlir::MlirPdllLspServerMain().
LogicalResult mlir::lsp::runTableGenLSPServer | ( | TableGenServer & | server, |
JSONTransport & | transport | ||
) |
Run the main loop of the LSP server using the given TableGen server and transport.
Definition at line 190 of file LSPServer.cpp.
References mlir::lsp::Logger::error(), mlir::failure(), mlir::lsp::MessageHandler::method(), mlir::lsp::MessageHandler::notification(), mlir::lsp::MessageHandler::outgoingNotification(), mlir::lsp::JSONTransport::run(), and mlir::success().
Referenced by mlir::TableGenLspServerMain().
llvm::json::Value mlir::lsp::toJSON | ( | const CodeAction & | value | ) |
Add support for JSON serialization.
Definition at line 1016 of file Protocol.cpp.
References mlir::lsp::CodeAction::diagnostics, mlir::lsp::CodeAction::edit, mlir::lsp::CodeAction::isPreferred, mlir::lsp::CodeAction::kind, and mlir::lsp::CodeAction::title.
llvm::json::Value mlir::lsp::toJSON | ( | const CompletionItem & | value | ) |
Add support for JSON serialization.
Definition at line 772 of file Protocol.cpp.
References mlir::lsp::CompletionItem::additionalTextEdits, mlir::lsp::CompletionItem::deprecated, mlir::lsp::CompletionItem::detail, mlir::lsp::CompletionItem::documentation, mlir::lsp::CompletionItem::filterText, mlir::lsp::CompletionItem::insertText, mlir::lsp::CompletionItem::insertTextFormat, mlir::lsp::CompletionItem::kind, mlir::lsp::CompletionItem::label, Missing, mlir::lsp::CompletionItem::sortText, and mlir::lsp::CompletionItem::textEdit.
llvm::json::Value mlir::lsp::toJSON | ( | const CompletionList & | value | ) |
Add support for JSON serialization.
Definition at line 815 of file Protocol.cpp.
References mlir::lsp::CompletionList::isIncomplete, and mlir::lsp::CompletionList::items.
llvm::json::Value mlir::lsp::toJSON | ( | const Diagnostic & | diag | ) |
llvm::json::Value mlir::lsp::toJSON | ( | const DiagnosticRelatedInformation & | info | ) |
Definition at line 638 of file Protocol.cpp.
References mlir::lsp::DiagnosticRelatedInformation::location, and mlir::lsp::DiagnosticRelatedInformation::message.
llvm::json::Value mlir::lsp::toJSON | ( | const DocumentLink & | value | ) |
Add support for JSON serialization.
Definition at line 918 of file Protocol.cpp.
References mlir::lsp::DocumentLink::range, and mlir::lsp::DocumentLink::target.
llvm::json::Value mlir::lsp::toJSON | ( | const DocumentSymbol & | symbol | ) |
Add support for JSON serialization.
Definition at line 603 of file Protocol.cpp.
References mlir::lsp::DocumentSymbol::children, mlir::lsp::DocumentSymbol::detail, mlir::lsp::DocumentSymbol::kind, mlir::lsp::DocumentSymbol::name, mlir::lsp::DocumentSymbol::range, and mlir::lsp::DocumentSymbol::selectionRange.
llvm::json::Value mlir::lsp::toJSON | ( | const Hover & | hover | ) |
Add support for JSON serialization.
Definition at line 592 of file Protocol.cpp.
References mlir::lsp::Hover::contents, mlir::lsp::Hover::range, and toJSON().
llvm::json::Value mlir::lsp::toJSON | ( | const InlayHint & | value | ) |
Add support for JSON serialization.
Definition at line 940 of file Protocol.cpp.
References mlir::lsp::InlayHint::kind, mlir::lsp::InlayHint::label, mlir::lsp::InlayHint::paddingLeft, mlir::lsp::InlayHint::paddingRight, and mlir::lsp::InlayHint::position.
llvm::json::Value mlir::lsp::toJSON | ( | const Location & | value | ) |
Definition at line 447 of file Protocol.cpp.
References mlir::lsp::Location::range, and mlir::lsp::Location::uri.
llvm::json::Value mlir::lsp::toJSON | ( | const MarkupContent & | mc | ) |
Add support for JSON serialization.
Definition at line 578 of file Protocol.cpp.
References mlir::lsp::MarkupContent::kind, toTextKind(), and mlir::lsp::MarkupContent::value.
llvm::json::Value mlir::lsp::toJSON | ( | const MLIRConvertBytecodeResult & | value | ) |
Add support for JSON serialization.
Definition at line 41 of file Protocol.cpp.
References mlir::lsp::MLIRConvertBytecodeResult::output.
llvm::json::Value mlir::lsp::toJSON | ( | const ParameterInformation & | value | ) |
Add support for JSON serialization.
Definition at line 854 of file Protocol.cpp.
References mlir::lsp::ParameterInformation::documentation, mlir::lsp::ParameterInformation::labelOffsets, and mlir::lsp::ParameterInformation::labelString.
llvm::json::Value mlir::lsp::toJSON | ( | const PDLLViewOutputResult & | value | ) |
Add support for JSON serialization.
Definition at line 74 of file Protocol.cpp.
References mlir::lsp::PDLLViewOutputResult::output.
llvm::json::Value mlir::lsp::toJSON | ( | const Position & | value | ) |
Definition at line 405 of file Protocol.cpp.
References mlir::lsp::Position::character, and mlir::lsp::Position::line.
llvm::json::Value mlir::lsp::toJSON | ( | const PublishDiagnosticsParams & | params | ) |
Add support for JSON serialization.
Definition at line 685 of file Protocol.cpp.
References mlir::lsp::PublishDiagnosticsParams::diagnostics, mlir::lsp::PublishDiagnosticsParams::uri, and mlir::lsp::PublishDiagnosticsParams::version.
llvm::json::Value mlir::lsp::toJSON | ( | const Range & | value | ) |
Definition at line 426 of file Protocol.cpp.
References mlir::lsp::Range::end, and mlir::lsp::Range::start.
llvm::json::Value mlir::lsp::toJSON | ( | const SignatureHelp & | value | ) |
Add support for JSON serialization.
Definition at line 892 of file Protocol.cpp.
References mlir::lsp::SignatureHelp::activeParameter, mlir::lsp::SignatureHelp::activeSignature, and mlir::lsp::SignatureHelp::signatures.
llvm::json::Value mlir::lsp::toJSON | ( | const SignatureInformation & | value | ) |
Add support for JSON serialization.
Definition at line 872 of file Protocol.cpp.
References mlir::lsp::SignatureInformation::documentation, mlir::lsp::SignatureInformation::label, and mlir::lsp::SignatureInformation::parameters.
llvm::json::Value mlir::lsp::toJSON | ( | const TextDocumentIdentifier & | value | ) |
Add support for JSON serialization.
Definition at line 364 of file Protocol.cpp.
References mlir::lsp::TextDocumentIdentifier::uri.
llvm::json::Value mlir::lsp::toJSON | ( | const TextEdit & | value | ) |
Definition at line 703 of file Protocol.cpp.
References mlir::lsp::TextEdit::newText, and mlir::lsp::TextEdit::range.
llvm::json::Value mlir::lsp::toJSON | ( | const URIForFile & | value | ) |
Add support for JSON serialization.
Definition at line 263 of file Protocol.cpp.
References mlir::lsp::URIForFile::uri().
Referenced by operator<<(), and toJSON().
llvm::json::Value mlir::lsp::toJSON | ( | const VersionedTextDocumentIdentifier & | value | ) |
Add support for JSON serialization.
Definition at line 380 of file Protocol.cpp.
References mlir::lsp::VersionedTextDocumentIdentifier::uri, and mlir::lsp::VersionedTextDocumentIdentifier::version.
llvm::json::Value mlir::lsp::toJSON | ( | const WorkspaceEdit & | value | ) |
Definition at line 1001 of file Protocol.cpp.
References mlir::lsp::WorkspaceEdit::changes.
|
constexpr |
Definition at line 791 of file Protocol.h.
|
constexpr |
Definition at line 789 of file Protocol.h.