40 const llvm::lsp::URIForFile &uri,
41 llvm::StringRef fileContents, int64_t
version,
42 std::vector<llvm::lsp::Diagnostic> &diagnostics);
50 update(
const llvm::lsp::URIForFile &uri, int64_t newVersion,
51 llvm::ArrayRef<llvm::lsp::TextDocumentContentChangeEvent> changes,
52 std::vector<llvm::lsp::Diagnostic> &diagnostics);
55 llvm::lsp::Position defPos,
56 std::vector<llvm::lsp::Location> &locations);
59 llvm::lsp::Position pos,
60 std::vector<llvm::lsp::Location> &references);
64 void initialize(
const llvm::lsp::URIForFile &uri, int64_t newVersion,
65 std::vector<llvm::lsp::Diagnostic> &diagnostics);
77 std::unique_ptr<circt::lsp::VerilogDocument>
document;
This class represents a text file containing one or more Verilog documents.
void initialize(const llvm::lsp::URIForFile &uri, int64_t newVersion, std::vector< llvm::lsp::Diagnostic > &diagnostics)
Initialize the text file from the given file contents.
int64_t getVersion() const
Return the current version of this text file.
VerilogServerContext & context
void getLocationsOf(const llvm::lsp::URIForFile &uri, llvm::lsp::Position defPos, std::vector< llvm::lsp::Location > &locations)
void findReferencesOf(const llvm::lsp::URIForFile &uri, llvm::lsp::Position pos, std::vector< llvm::lsp::Location > &references)
std::string contents
The full string contents of the file.
int64_t version
The version of this file.
llvm::LogicalResult update(const llvm::lsp::URIForFile &uri, int64_t newVersion, llvm::ArrayRef< llvm::lsp::TextDocumentContentChangeEvent > changes, std::vector< llvm::lsp::Diagnostic > &diagnostics)
Update the file to the new version using the provided set of content changes.
std::unique_ptr< circt::lsp::VerilogDocument > document
The chunks of this file.