file

package
v1.16.9 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Location
	Line    int    `json:"line"`
	Column  int    `json:"column"`
	Message string `json:"message"`
	Snippet string `json:"snippet"`
	Prev    error  `json:"prev"`
}

func (*Error) Bind

func (e *Error) Bind(source Source) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

func (*Error) Wrap

func (e *Error) Wrap(err error)

type Location

type Location struct {
	From int `json:"from"`
	To   int `json:"to"`
}

type Source

type Source []rune

func NewSource

func NewSource(contents string) Source

func (Source) Snippet

func (s Source) Snippet(line int) (string, bool)

func (Source) String added in v1.16.8

func (s Source) String() string

Jump to

Keyboard shortcuts

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