source

package
v1.0.0-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package source defines portable Ferret source inputs and coordinates. Span offset units remain defined by the producer of each source value.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	Position
	SourceName string `json:"sourceName"`
}

Location adds the semantic source name to a Position. SourceName does not imply that the source is backed by a local filesystem path.

type Position

type Position struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

Position identifies a line and column within source text.

type Range

type Range struct {
	Location
	Span Span `json:"span"`
}

Range combines a source Location with its producer-defined Span.

type Source

type Source struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

func New

func New(name, content string) Source

func NewAnonymous

func NewAnonymous(content string) Source

type Span

type Span struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

Span identifies a producer-defined interval within source text. Its offset units are defined by the producer rather than by the universal API.

Jump to

Keyboard shortcuts

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