Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentManager ¶
type DocumentManager struct {
// contains filtered or unexported fields
}
a synced map that manages document states
func NewDocumentManager ¶
func NewDocumentManager() *DocumentManager
func (*DocumentManager) AddAndParse ¶
func (dm *DocumentManager) AddAndParse(vscURI, content string) error
adds a document to the map and parses its content
func (*DocumentManager) Delete ¶
func (dm *DocumentManager) Delete(vscURI string)
func (*DocumentManager) Get ¶
func (dm *DocumentManager) Get(vscURI string) (*DocumentState, bool)
func (*DocumentManager) GetFromMod ¶
func (dm *DocumentManager) GetFromMod(mod *ast.Module) (*DocumentState, bool)
type DocumentState ¶
type DocumentState struct { Content string // the content of the document Uri uri.URI // the uri from the client Path string // the filepath as parsed from the uri Module *ast.Module // the corresponding ddp module NeedReparse atomic.Bool // whether the document needs to be reparsed LatestErrors []ddperror.Error // the errors from the last parsing }
represents the state of a single document
Click to show internal directories.
Click to hide internal directories.