sourcemap

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 4 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

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 Token

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

Jump to

Keyboard shortcuts

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