tokeninternal

package
v0.21.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

package tokeninternal provides convenient helpers for the go/token package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneFileSet

func CloneFileSet(fset *token.FileSet) *token.FileSet

CloneFileSet creates a new FileSet holding all files in fset. It does not create copies of the token.Files in fset: they are added to the resulting FileSet unmodified.

func FileSetFor

func FileSetFor(files ...*token.File) *token.FileSet

FileSetFor returns a new FileSet containing a sequence of new Files with the same base, size, and line as the input files, for use in APIs that require a FileSet.

Precondition: the input files must be non-overlapping, and sorted in order of their Base.

Types

This section is empty.

Jump to

Keyboard shortcuts

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