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

Function createProtocolRange

internal/bake/hcl/documentHighlight.go:99–123  ·  view source on GitHub ↗
(hclRange hcl.Range, quoted bool)

Source from the content-addressed store, hash-verified

97}
98
99func createProtocolRange(hclRange hcl.Range, quoted bool) protocol.Range {
100 if quoted {
101 return protocol.Range{
102 Start: protocol.Position{
103 Line: uint32(hclRange.Start.Line - 1),
104 Character: uint32(hclRange.Start.Column),
105 },
106 End: protocol.Position{
107 Line: uint32(hclRange.End.Line - 1),
108 Character: uint32(hclRange.End.Column - 2),
109 },
110 }
111 }
112
113 return protocol.Range{
114 Start: protocol.Position{
115 Line: uint32(hclRange.Start.Line - 1),
116 Character: uint32(hclRange.Start.Column - 1),
117 },
118 End: protocol.Position{
119 Line: uint32(hclRange.End.Line - 1),
120 Character: uint32(hclRange.End.Column - 1),
121 },
122 }
123}

Callers 2

DocumentHighlightFunction · 0.85
CollectDiagnosticsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected