helper

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 5 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 FromProtocolPosition added in v0.4.0

func FromProtocolPosition(pos protocol.Position) token.Position

func FromProtocolRange added in v0.4.0

func FromProtocolRange(rang protocol.Range) token.Range

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 ToProtocolPosition added in v0.4.0

func ToProtocolPosition(pos token.Position) protocol.Position

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