Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TextOffsetMapper ¶
type TextOffsetMapper struct {
Content []byte
// contains filtered or unexported fields
}
TextOffsetMapper is used for conversions related to text offsets.
func NewTextOffsetMapper ¶
func NewTextOffsetMapper(content []byte) *TextOffsetMapper
NewTextOffsetMapper creates a new mapper for the given URI and content.
func (*TextOffsetMapper) OffsetPosition ¶
func (m *TextOffsetMapper) OffsetPosition(offset int) (protocol.Position, error)
OffsetPosition converts a byte offset to a protocol (UTF-16) position.
func (*TextOffsetMapper) PositionOffset ¶
func (m *TextOffsetMapper) PositionOffset(p protocol.Position) (int, error)
PositionOffset converts a protocol (UTF-16) position to a byte offset.
Click to show internal directories.
Click to hide internal directories.