sourcemap

package
v1.9.10 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const NoID int32 = -1

Variables

This section is empty.

Functions

func AppendVLQ

func AppendVLQ(dst []byte, v int64) []byte

func BuildTW added in v1.8.1

func BuildTW(sourceMap, bundle []byte) ([]byte, error)

func ValidTW added in v1.8.1

func ValidTW(data []byte) bool

Types

type ParsedMap

type ParsedMap struct {
	Sources []string
	Names   []string
	Tokens  []Token // sorted by (GenLine, GenCol)
}

func Parse

func Parse(data []byte) (*ParsedMap, error)

func (*ParsedMap) FloorToken

func (m *ParsedMap) FloorToken(line, col uint32) *Token

FloorToken returns the token at the greatest (GenLine, GenCol) <= (line, col), walking back to the first of several tokens that share that position (rust-sourcemap greatest_lower_bound). Returns nil before the first token.

type StackTraceFrame added in v1.8.1

type StackTraceFrame struct {
	File string
	Line uint32
	Col  uint32
	Fn   string
}

func LookupTW added in v1.8.1

func LookupTW(data []byte, genLine, genCol uint32) (StackTraceFrame, bool)

type Token

type Token struct {
	GenLine, GenCol uint32
	SrcID           int32
	SrcLine, SrcCol uint32
	NameID          int32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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