|
MLIR 22.0.0git
|
This class implements all of the PDLL related functionality necessary for a language server. More...
#include "Tools/mlir-pdll-lsp-server/PDLLServer.h"
Classes | |
| struct | Impl |
| struct | Options |
Public Member Functions | |
| PDLLServer (const Options &options) | |
| ~PDLLServer () | |
| void | addDocument (const URIForFile &uri, StringRef contents, int64_t version, std::vector< Diagnostic > &diagnostics) |
| Add the document, with the provided version, at the given URI. | |
| void | updateDocument (const URIForFile &uri, ArrayRef< TextDocumentContentChangeEvent > changes, int64_t version, std::vector< Diagnostic > &diagnostics) |
| Update the document, with the provided version, at the given URI. | |
| std::optional< int64_t > | removeDocument (const URIForFile &uri) |
| Remove the document with the given uri. | |
| void | getLocationsOf (const URIForFile &uri, const Position &defPos, std::vector< Location > &locations) |
| Return the locations of the object pointed at by the given position. | |
| void | findReferencesOf (const URIForFile &uri, const Position &pos, std::vector< Location > &references) |
| Find all references of the object pointed at by the given position. | |
| void | getDocumentLinks (const URIForFile &uri, std::vector< DocumentLink > &documentLinks) |
| Return the document links referenced by the given file. | |
| std::optional< Hover > | findHover (const URIForFile &uri, const Position &hoverPos) |
| Find a hover description for the given hover position, or std::nullopt if one couldn't be found. | |
| void | findDocumentSymbols (const URIForFile &uri, std::vector< DocumentSymbol > &symbols) |
| Find all of the document symbols within the given file. | |
| CompletionList | getCodeCompletion (const URIForFile &uri, const Position &completePos) |
| Get the code completion list for the position within the given file. | |
| SignatureHelp | getSignatureHelp (const URIForFile &uri, const Position &helpPos) |
| Get the signature help for the position within the given file. | |
| void | getInlayHints (const URIForFile &uri, const Range &range, std::vector< InlayHint > &inlayHints) |
| Get the inlay hints for the range within the given file. | |
| std::optional< PDLLViewOutputResult > | getPDLLViewOutput (const URIForFile &uri, PDLLViewOutputKind kind) |
| Get the output of the given PDLL file, or std::nullopt if there is no valid output. | |
This class implements all of the PDLL related functionality necessary for a language server.
This class allows for keeping the PDLL specific logic separate from the logic that involves LSP server/client communication.
Definition at line 42 of file PDLLServer.h.
| lsp::PDLLServer::PDLLServer | ( | const Options & | options | ) |
Definition at line 1747 of file PDLLServer.cpp.
References options.
|
default |
| void lsp::PDLLServer::addDocument | ( | const URIForFile & | uri, |
| StringRef | contents, | ||
| int64_t | version, | ||
| std::vector< Diagnostic > & | diagnostics ) |
Add the document, with the provided version, at the given URI.
Any diagnostics emitted for this document should be added to diagnostics.
Definition at line 1751 of file PDLLServer.cpp.
| void lsp::PDLLServer::findDocumentSymbols | ( | const URIForFile & | uri, |
| std::vector< DocumentSymbol > & | symbols ) |
Find all of the document symbols within the given file.
Definition at line 1818 of file PDLLServer.cpp.
| std::optional< llvm::lsp::Hover > lsp::PDLLServer::findHover | ( | const URIForFile & | uri, |
| const Position & | hoverPos ) |
Find a hover description for the given hover position, or std::nullopt if one couldn't be found.
Definition at line 1811 of file PDLLServer.cpp.
| void lsp::PDLLServer::findReferencesOf | ( | const URIForFile & | uri, |
| const Position & | pos, | ||
| std::vector< Location > & | references ) |
Find all references of the object pointed at by the given position.
Definition at line 1795 of file PDLLServer.cpp.
| lsp::CompletionList lsp::PDLLServer::getCodeCompletion | ( | const URIForFile & | uri, |
| const Position & | completePos ) |
Get the code completion list for the position within the given file.
Definition at line 1826 of file PDLLServer.cpp.
| void lsp::PDLLServer::getDocumentLinks | ( | const URIForFile & | uri, |
| std::vector< DocumentLink > & | documentLinks ) |
Return the document links referenced by the given file.
Definition at line 1803 of file PDLLServer.cpp.
| void lsp::PDLLServer::getInlayHints | ( | const URIForFile & | uri, |
| const Range & | range, | ||
| std::vector< InlayHint > & | inlayHints ) |
Get the inlay hints for the range within the given file.
Definition at line 1843 of file PDLLServer.cpp.
| void lsp::PDLLServer::getLocationsOf | ( | const URIForFile & | uri, |
| const Position & | defPos, | ||
| std::vector< Location > & | locations ) |
Return the locations of the object pointed at by the given position.
Definition at line 1787 of file PDLLServer.cpp.
| std::optional< lsp::PDLLViewOutputResult > lsp::PDLLServer::getPDLLViewOutput | ( | const URIForFile & | uri, |
| PDLLViewOutputKind | kind ) |
Get the output of the given PDLL file, or std::nullopt if there is no valid output.
Definition at line 1856 of file PDLLServer.cpp.
| llvm::lsp::SignatureHelp lsp::PDLLServer::getSignatureHelp | ( | const URIForFile & | uri, |
| const Position & | helpPos ) |
Get the signature help for the position within the given file.
Definition at line 1835 of file PDLLServer.cpp.
| std::optional< int64_t > lsp::PDLLServer::removeDocument | ( | const URIForFile & | uri | ) |
Remove the document with the given uri.
Returns the version of the removed document, or std::nullopt if the uri did not have a corresponding document within the server.
Definition at line 1777 of file PDLLServer.cpp.
| void lsp::PDLLServer::updateDocument | ( | const URIForFile & | uri, |
| ArrayRef< TextDocumentContentChangeEvent > | changes, | ||
| int64_t | version, | ||
| std::vector< Diagnostic > & | diagnostics ) |
Update the document, with the provided version, at the given URI.
Any diagnostics emitted for this document should be added to diagnostics.
Definition at line 1763 of file PDLLServer.cpp.