Phasor 3.1.1
Stack VM based Programming Language
Loading...
Searching...
No Matches
Phasor::LSP Class Reference

#include <LSP.hpp>

Classes

struct  Diagnostic
struct  SymbolInfo
struct  Location
struct  DocumentState

Public Member Functions

 LSP ()=default
 ~LSP ()=default
void openDocument (const std::string &uri, const std::string &text)
void changeDocument (const std::string &uri, const std::string &newText)
void closeDocument (const std::string &uri)
std::vector< DiagnosticgetDiagnostics (const std::string &uri) const
AST::NodefindNodeAtPosition (const std::string &uri, size_t line, size_t column)
std::optional< std::string > getHover (const std::string &uri, size_t line, size_t column)
std::optional< LocationgetDefinition (const std::string &uri, size_t line, size_t column)

Private Member Functions

void compile (DocumentState &doc)
void computeLineOffsets (DocumentState &doc)
void buildGlobalSymbols (DocumentState &doc)
AST::NodewalkForNode (const DocumentState &doc, size_t line, size_t col)
std::string symbolNameAt (AST::Node *node) const

Private Attributes

std::unordered_map< std::string, DocumentStatedocuments

Detailed Description

Definition at line 13 of file LSP.hpp.

Constructor & Destructor Documentation

◆ LSP()

Phasor::LSP::LSP ( )
default

◆ ~LSP()

Phasor::LSP::~LSP ( )
default

Member Function Documentation

◆ buildGlobalSymbols()

void Phasor::LSP::buildGlobalSymbols ( DocumentState & doc)
private

Definition at line 394 of file LSP.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeDocument()

void Phasor::LSP::changeDocument ( const std::string & uri,
const std::string & newText )

Definition at line 80 of file LSP.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeDocument()

void Phasor::LSP::closeDocument ( const std::string & uri)

Definition at line 96 of file LSP.cpp.

Here is the caller graph for this function:

◆ compile()

void Phasor::LSP::compile ( DocumentState & doc)
private

Definition at line 427 of file LSP.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeLineOffsets()

void Phasor::LSP::computeLineOffsets ( DocumentState & doc)
private

Definition at line 385 of file LSP.cpp.

Here is the caller graph for this function:

◆ findNodeAtPosition()

AST::Node * Phasor::LSP::findNodeAtPosition ( const std::string & uri,
size_t line,
size_t column )

Definition at line 109 of file LSP.cpp.

Here is the call graph for this function:

◆ getDefinition()

std::optional< LSP::Location > Phasor::LSP::getDefinition ( const std::string & uri,
size_t line,
size_t column )

Definition at line 143 of file LSP.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDiagnostics()

std::vector< LSP::Diagnostic > Phasor::LSP::getDiagnostics ( const std::string & uri) const

Definition at line 101 of file LSP.cpp.

Here is the caller graph for this function:

◆ getHover()

std::optional< std::string > Phasor::LSP::getHover ( const std::string & uri,
size_t line,
size_t column )

Definition at line 117 of file LSP.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openDocument()

void Phasor::LSP::openDocument ( const std::string & uri,
const std::string & text )

Definition at line 71 of file LSP.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ symbolNameAt()

std::string Phasor::LSP::symbolNameAt ( AST::Node * node) const
private

Definition at line 368 of file LSP.cpp.

Here is the caller graph for this function:

◆ walkForNode()

AST::Node * Phasor::LSP::walkForNode ( const DocumentState & doc,
size_t line,
size_t col )
private

Definition at line 358 of file LSP.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ documents

std::unordered_map<std::string, DocumentState> Phasor::LSP::documents
private

Definition at line 66 of file LSP.hpp.


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