source

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Location Location
	Message  string
}

Error represents an error in the source code at a given location.

func GetErrors

func GetErrors(err error) []*Error

func (*Error) Error

func (l *Error) Error() string

type Errors

type Errors struct {
	Errs []error
}

Errors represents a collection of source code errors.

func (*Errors) Error

func (e *Errors) Error() string

func (*Errors) ErrorOrNil

func (e *Errors) ErrorOrNil() error

func (*Errors) Push

func (e *Errors) Push(err error)

type Location

type Location struct {
	Index  int
	Line   int
	Column int
}

Location represents a location in the source code.

func Start

func Start() *Location

Start creates a new starting location.

func (*Location) Advance

func (l *Location) Advance(char rune)

Advance advances the location based on a single character.

func (*Location) Nested

func (l *Location) Nested(nested Location) Location

Nested returns a new location that is nested within the current location.

func (*Location) String

func (l *Location) String() string

String returns a string representation of the location.

Jump to

Keyboard shortcuts

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