Movatterモバイル変換


[0]ホーム

URL:


Warning Deprecated: Use the "google.golang.org/protobuf" module instead.

remap

package
v1.5.4Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License:BSD-3-ClauseImports:3Imported by:0

Details

Repository

github.com/golang/protobuf

Links

Documentation

Overview

Package remap handles tracking the locations of Go tokens in a source textacross a rewrite by the Go formatter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeLocation

type Location struct {Pos, Endint// End is exclusive}

A Location represents a span of byte offsets in the source text.

typeMap

type Map map[Location]Location

A Map represents a mapping between token locations in an input source textand locations in the correspnding output text.

funcCompute

func Compute(input, output []byte) (Map,error)

Compute constructs a location mapping from input to output. An error isreported if any of the tokens of output cannot be mapped.

func (Map)Find

func (mMap) Find(pos, endint) (Location,bool)

Find reports whether the specified span is recorded by m, and if so returnsthe new location it was mapped to. If the input span was not found, thereturned location is the same as the input.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp