helper

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](s []T, e T) bool

func CutRangeOut

func CutRangeOut(wholeRange, innerRange token.Range) []token.Range

returns two new ranges, constructed by cutting innerRange out of wholeRange innerRange must be completely contained in wholeRange the resulting ranges are wholeRange.Start - innerRange.Start and innerRange.End - wholeRange.End

func GetRangeLength

func GetRangeLength(rang token.Range, doc *documents.DocumentState) int

returns the length of a token.Range

func IsInRange

func IsInRange(rang token.Range, pos protocol.Position) bool

returns wether the given protocol.Position is inside rang

func ToProtocolRange

func ToProtocolRange(rang token.Range) protocol.Range

converts a token.Range to a protocol.Range

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL