Versions in this module Expand all Collapse all v0 v0.0.35 Oct 12, 2022 Changes in this version + var Invalid = Span + func Compare(a, b Span) int + func ComparePoint(a, b Point) int + func CompareURI(a, b URI) int + func NewTokenFile(filename string, content []byte) *token.File + func ToOffset(tf *token.File, line, col int) (int, error) + func ToPosition(tf *token.File, offset int) (int, int, error) + func ToUTF16Column(p Point, content []byte) (int, error) + type Point struct + func FromUTF16Column(p Point, chr int, content []byte) (Point, error) + func NewPoint(line, col, offset int) Point + func (p *Point) MarshalJSON() ([]byte, error) + func (p *Point) UnmarshalJSON(b []byte) error + func (p Point) Column() int + func (p Point) HasOffset() bool + func (p Point) HasPosition() bool + func (p Point) IsValid() bool + func (p Point) Line() int + func (p Point) Offset() int + type Range struct + End token.Pos + Start token.Pos + TokFile *token.File + func NewRange(file *token.File, start, end token.Pos) Range + func (r Range) IsPoint() bool + func (r Range) Span() (Span, error) + type Span struct + func FileSpan(posFile, srcFile *token.File, start, end token.Pos) (Span, error) + func New(uri URI, start, end Point) Span + func Parse(input string) Span + func ParseInDir(input, wd string) Span + func (s *Span) MarshalJSON() ([]byte, error) + func (s *Span) UnmarshalJSON(b []byte) error + func (s Span) End() Point + func (s Span) Format(f fmt.State, c rune) + func (s Span) HasOffset() bool + func (s Span) HasPosition() bool + func (s Span) IsPoint() bool + func (s Span) IsValid() bool + func (s Span) Range(tf *token.File) (Range, error) + func (s Span) Start() Point + func (s Span) URI() URI + func (s Span) WithAll(tf *token.File) (Span, error) + func (s Span) WithOffset(tf *token.File) (Span, error) + func (s Span) WithPosition(tf *token.File) (Span, error) + func (span *Span) SetRange(file *token.File, start, end token.Pos) + type URI string + func URIFromPath(path string) URI + func URIFromURI(s string) URI + func (uri URI) Filename() string + func (uri URI) IsFile() bool