helper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AliasParamNameEquals added in v0.3.0

func AliasParamNameEquals(t1 token.Token, name string) bool

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 GetAliasParamProtocolRange added in v0.3.0

func GetAliasParamProtocolRange(aliasToken token.Token) protocol.Range

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