MCPcopy Create free account
hub / github.com/docker/docker-language-server / parse

Method parse

internal/pkg/document/manager.go:240–252  ·  view source on GitHub ↗
(_ context.Context, uri uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte)

Source from the content-addressed store, hash-verified

238}
239
240func (m *Manager) parse(_ context.Context, uri uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte) (bool, error) {
241 doc, loaded := m.docs[uri]
242 changed := true
243 if !loaded {
244 doc = m.newDocFunc(m, uri, identifier, version, input)
245 m.docs[uri] = doc
246 m.diagnosticsProcessing[uri] = &documentLock{queue: debounce.New(time.Millisecond * 50)}
247 } else {
248 changed = doc.Update(version, input)
249 }
250
251 return changed, nil
252}
253
254// LockDocument locks the specified document in preparation of
255// publishing diagnostics. False may be returned if the document is not

Callers 3

writeMethod · 0.95
OverwriteMethod · 0.95
readAndParseMethod · 0.95

Calls 1

UpdateMethod · 0.65

Tested by

no test coverage detected