srclocation

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const GithubGreen string = "#e6ffed"
View Source
const GithubRed string = "#ffeef0"

Variables

This section is empty.

Functions

This section is empty.

Types

type SourceLocation

type SourceLocation struct {
	ByteOffset     int
	ByteLength     int
	SourceFileName string
	JumpType       rune
}

A particular range of bytes in a source file.

func (SourceLocation) ByteLocToSnippet

func (location SourceLocation) ByteLocToSnippet() (int, int, []byte, error)

func (SourceLocation) IsDisjointWith

func (location1 SourceLocation) IsDisjointWith(location2 SourceLocation) bool

func (SourceLocation) LocationMarkup

func (location SourceLocation) LocationMarkup() ([]byte, error)

func (SourceLocation) Overlaps

func (location1 SourceLocation) Overlaps(location2 SourceLocation) bool

It can be the case that srcloc1.Overlaps(srcloc2) AND srcloc2.Overlaps(srcloc1), if they're the same size.

func (SourceLocation) PartiallyOverlaps

func (location1 SourceLocation) PartiallyOverlaps(location2 SourceLocation) bool

Jump to

Keyboard shortcuts

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