|
MLIR
22.0.0git
|
This class implements all of the TableGen related functionality necessary for a language server. More...
#include "Tools/tblgen-lsp-server/TableGenServer.h"
Classes | |
| struct | Impl |
| struct | Options |
Public Member Functions | |
| TableGenServer (const Options &options) | |
| ~TableGenServer () | |
| 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. More... | |
| 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. More... | |
| std::optional< int64_t > | removeDocument (const URIForFile &uri) |
| Remove the document with the given uri. More... | |
| void | getLocationsOf (const URIForFile &uri, const Position &defPos, std::vector< Location > &locations) |
| Return the locations of the object pointed at by the given position. More... | |
| void | findReferencesOf (const URIForFile &uri, const Position &pos, std::vector< Location > &references) |
| Find all references of the object pointed at by the given position. More... | |
| void | getDocumentLinks (const URIForFile &uri, std::vector< DocumentLink > &documentLinks) |
| Return the document links referenced by the given file. More... | |
| 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. More... | |
This class implements all of the TableGen related functionality necessary for a language server.
This class allows for keeping the TableGen specific logic separate from the logic that involves LSP server/client communication.
Definition at line 33 of file TableGenServer.h.
| lsp::TableGenServer::TableGenServer | ( | const Options & | options | ) |
Definition at line 675 of file TableGenServer.cpp.
|
default |
| void lsp::TableGenServer::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 679 of file TableGenServer.cpp.
| std::optional< llvm::lsp::Hover > lsp::TableGenServer::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 740 of file TableGenServer.cpp.
| void lsp::TableGenServer::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 724 of file TableGenServer.cpp.
| void lsp::TableGenServer::getDocumentLinks | ( | const URIForFile & | uri, |
| std::vector< DocumentLink > & | documentLinks | ||
| ) |
Return the document links referenced by the given file.
Definition at line 732 of file TableGenServer.cpp.
| void lsp::TableGenServer::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 716 of file TableGenServer.cpp.
| std::optional< int64_t > lsp::TableGenServer::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 706 of file TableGenServer.cpp.
| void lsp::TableGenServer::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 691 of file TableGenServer.cpp.
References mlir::remark::failed().