common

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(s string) []byte

Types

type Encoding

type Encoding int
const (
	UTF8 Encoding = iota
	UTF16
)

type Err

type Err struct {
	Wire *jsonrpc.WireError
	Msg  string
}

func FromErr

func FromErr(wire *jsonrpc.WireError, err error) *Err

func NewErr

func NewErr(wire *jsonrpc.WireError, msg string) *Err

func (*Err) Error

func (e *Err) Error() string

type Pos

type Pos [2]int

func NewPos

func NewPos(line, column int) Pos

func NewTSPos

func NewTSPos(point tree_sitter.Point) Pos

func NoPos

func NoPos() Pos

func (Pos) Advance

func (p Pos) Advance() Pos

func (Pos) Column

func (p Pos) Column() int

func (Pos) Compare

func (c Pos) Compare(p Pos) int

func (Pos) IsValid

func (p Pos) IsValid() bool

func (Pos) Line

func (p Pos) Line() int

func (Pos) String

func (p Pos) String() string

func (Pos) TS

func (p Pos) TS() tree_sitter.Point

type Range

type Range [2]Pos

func NewRange

func NewRange(beg Pos, end Pos) Range

func NewTSRange

func NewTSRange(ran tree_sitter.Range) Range

func NoRange

func NoRange() Range

func (Range) Beg

func (r Range) Beg() Pos

func (Range) Contains

func (r Range) Contains(pos Pos, includeEnd bool) bool

func (Range) CountLines

func (r Range) CountLines() int

func (Range) End

func (r Range) End() Pos

func (Range) IsCursor

func (r Range) IsCursor() bool

func (Range) IsValid

func (r Range) IsValid() bool

func (Range) Lines

func (r Range) Lines() []int

func (Range) String

func (r Range) String() string

func (Range) TS

func (r Range) TS() tree_sitter.Range

Jump to

Keyboard shortcuts

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