CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::lsp::VerilogServer Class Reference

This class implements all of the Verilog related functionality necessary for a language server. More...

#include <VerilogServer.h>

Collaboration diagram for circt::lsp::VerilogServer:

Classes

struct  Impl

Public Member Functions

 VerilogServer (const circt::lsp::VerilogServerOptions &options)
 ~VerilogServer ()
void addDocument (const URIForFile &uri, llvm::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, llvm::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 llvm::lsp::Position &defPos, std::vector< llvm::lsp::Location > &locations)
 Return the locations of the object pointed at by the given position.
void findReferencesOf (const URIForFile &uri, const llvm::lsp::Position &pos, std::vector< llvm::lsp::Location > &references)
 Find all references of the object pointed at by the given position.

Private Attributes

std::unique_ptr< Impl > impl

Detailed Description

This class implements all of the Verilog related functionality necessary for a language server.

This class allows for keeping the Verilog specific logic separate from the logic that involves LSP server/client communication.

Definition at line 49 of file VerilogServer.h.

Constructor & Destructor Documentation

◆ VerilogServer()

circt::lsp::VerilogServer::VerilogServer ( const circt::lsp::VerilogServerOptions & options)

Definition at line 55 of file VerilogServer.cpp.

References impl.

◆ ~VerilogServer()

circt::lsp::VerilogServer::~VerilogServer ( )
default

Member Function Documentation

◆ addDocument()

void circt::lsp::VerilogServer::addDocument ( const URIForFile & uri,
llvm::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 59 of file VerilogServer.cpp.

References impl.

◆ findReferencesOf()

void circt::lsp::VerilogServer::findReferencesOf ( const URIForFile & uri,
const llvm::lsp::Position & pos,
std::vector< llvm::lsp::Location > & references )

Find all references of the object pointed at by the given position.

Definition at line 101 of file VerilogServer.cpp.

References impl.

◆ getLocationsOf()

void circt::lsp::VerilogServer::getLocationsOf ( const URIForFile & uri,
const llvm::lsp::Position & defPos,
std::vector< llvm::lsp::Location > & locations )

Return the locations of the object pointed at by the given position.

Definition at line 93 of file VerilogServer.cpp.

References impl.

◆ removeDocument()

std::optional< int64_t > circt::lsp::VerilogServer::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 83 of file VerilogServer.cpp.

References impl.

◆ updateDocument()

void circt::lsp::VerilogServer::updateDocument ( const URIForFile & uri,
llvm::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 67 of file VerilogServer.cpp.

References impl.

Member Data Documentation

◆ impl

std::unique_ptr<Impl> circt::lsp::VerilogServer::impl
private

The documentation for this class was generated from the following files: