typeparams

package standard library
Version: master (1243ec9) Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package typeparams provides functions to work with type parameter data stored in the AST, while these AST changes are guarded by a build constraint.

Index

Constants

View Source
const (
	DisallowTypeSets = 1 << 29 // Disallow eliding 'interface' in constraint type sets.
	DisallowParsing  = 1 << 30 // Disallow type parameters entirely.
)

'Hidden' parser modes to control the parsing of type-parameter related features.

Variables

This section is empty.

Functions

func PackIndexExpr added in go1.18

func PackIndexExpr(x ast.Expr, lbrack token.Pos, exprs []ast.Expr, rbrack token.Pos) ast.Expr

Types

type IndexExpr added in go1.18

type IndexExpr struct {
	Orig ast.Expr // the wrapped expr, which may be distinct from the IndexListExpr below.
	*ast.IndexListExpr
}

IndexExpr wraps an ast.IndexExpr or ast.IndexListExpr.

Orig holds the original ast.Expr from which this IndexExpr was derived.

func UnpackIndexExpr added in go1.18

func UnpackIndexExpr(n ast.Node) *IndexExpr

Jump to

Keyboard shortcuts

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