constant

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package constant provides a mockable wrapper for go/constant.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) BinaryOp

func (*Impl) BinaryOp(x_ constant.Value, op token.Token, y_ constant.Value) constant.Value

func (*Impl) BitLen

func (*Impl) BitLen(x constant.Value) int

func (*Impl) BoolVal

func (*Impl) BoolVal(x constant.Value) bool

func (*Impl) Bytes

func (*Impl) Bytes(x constant.Value) []byte

func (*Impl) Compare

func (*Impl) Compare(x_ constant.Value, op token.Token, y_ constant.Value) bool

func (*Impl) Denom

func (*Impl) Denom(x constant.Value) constant.Value

func (*Impl) Float32Val

func (*Impl) Float32Val(x constant.Value) (float32, bool)

func (*Impl) Float64Val

func (*Impl) Float64Val(x constant.Value) (float64, bool)

func (*Impl) Imag

func (*Impl) Imag(x constant.Value) constant.Value

func (*Impl) Int64Val

func (*Impl) Int64Val(x constant.Value) (int64, bool)

func (*Impl) Make

func (*Impl) Make(x any) constant.Value

func (*Impl) MakeBool

func (*Impl) MakeBool(b bool) constant.Value

func (*Impl) MakeFloat64

func (*Impl) MakeFloat64(x float64) constant.Value

func (*Impl) MakeFromBytes

func (*Impl) MakeFromBytes(bytes []byte) constant.Value

func (*Impl) MakeFromLiteral

func (*Impl) MakeFromLiteral(lit string, tok token.Token, zero uint) constant.Value

func (*Impl) MakeImag

func (*Impl) MakeImag(x constant.Value) constant.Value

func (*Impl) MakeInt64

func (*Impl) MakeInt64(x int64) constant.Value

func (*Impl) MakeString

func (*Impl) MakeString(s string) constant.Value

func (*Impl) MakeUint64

func (*Impl) MakeUint64(x uint64) constant.Value

func (*Impl) MakeUnknown

func (*Impl) MakeUnknown() constant.Value

func (*Impl) Num

func (*Impl) Num(x constant.Value) constant.Value

func (*Impl) Real

func (*Impl) Real(x constant.Value) constant.Value

func (*Impl) Shift

func (*Impl) Shift(x constant.Value, op token.Token, s uint) constant.Value

func (*Impl) Sign

func (*Impl) Sign(x constant.Value) int

func (*Impl) StringVal

func (*Impl) StringVal(x constant.Value) string

func (*Impl) ToComplex

func (*Impl) ToComplex(x constant.Value) constant.Value

func (*Impl) ToFloat

func (*Impl) ToFloat(x constant.Value) constant.Value

func (*Impl) ToInt

func (*Impl) ToInt(x constant.Value) constant.Value

func (*Impl) Uint64Val

func (*Impl) Uint64Val(x constant.Value) (uint64, bool)

func (*Impl) UnaryOp

func (*Impl) UnaryOp(op token.Token, y constant.Value, prec uint) constant.Value

func (*Impl) Val

func (*Impl) Val(x constant.Value) any

type Interface

type Interface interface {
	BinaryOp(x_ constant.Value, op token.Token, y_ constant.Value) constant.Value
	BitLen(x constant.Value) int
	BoolVal(x constant.Value) bool
	Bytes(x constant.Value) []byte
	Compare(x_ constant.Value, op token.Token, y_ constant.Value) bool
	Denom(x constant.Value) constant.Value
	Float32Val(x constant.Value) (float32, bool)
	Float64Val(x constant.Value) (float64, bool)
	Imag(x constant.Value) constant.Value
	Int64Val(x constant.Value) (int64, bool)
	Make(x any) constant.Value
	MakeBool(b bool) constant.Value
	MakeFloat64(x float64) constant.Value
	MakeFromBytes(bytes []byte) constant.Value
	MakeFromLiteral(lit string, tok token.Token, zero uint) constant.Value
	MakeImag(x constant.Value) constant.Value
	MakeInt64(x int64) constant.Value
	MakeString(s string) constant.Value
	MakeUint64(x uint64) constant.Value
	MakeUnknown() constant.Value
	Num(x constant.Value) constant.Value
	Real(x constant.Value) constant.Value
	Shift(x constant.Value, op token.Token, s uint) constant.Value
	Sign(x constant.Value) int
	StringVal(x constant.Value) string
	ToComplex(x constant.Value) constant.Value
	ToFloat(x constant.Value) constant.Value
	ToInt(x constant.Value) constant.Value
	Uint64Val(x constant.Value) (uint64, bool)
	UnaryOp(op token.Token, y constant.Value, prec uint) constant.Value
	Val(x constant.Value) any
}

Jump to

Keyboard shortcuts

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