Documentation
¶
Index ¶
- func NewTypeAndValueForCallResult(typ types.Type, val constant.Value) (ret types.TypeAndValue)
- func NewTypeAndValueForObject(obj types.Object) (ret types.TypeAndValue)
- func NewTypeAndValueForType(typ types.Type) (ret types.TypeAndValue)
- func NewTypeAndValueForValue(typ types.Type, val constant.Value, mode OperandMode) (ret types.TypeAndValue)
- type OperandMode
- type TypeAndValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTypeAndValueForCallResult ¶ added in v1.1.12
func NewTypeAndValueForObject ¶ added in v1.1.12
func NewTypeAndValueForObject(obj types.Object) (ret types.TypeAndValue)
func NewTypeAndValueForType ¶ added in v1.1.12
func NewTypeAndValueForType(typ types.Type) (ret types.TypeAndValue)
func NewTypeAndValueForValue ¶ added in v1.1.12
func NewTypeAndValueForValue(typ types.Type, val constant.Value, mode OperandMode) (ret types.TypeAndValue)
Types ¶
type OperandMode ¶ added in v1.2.0
type OperandMode byte
An OperandMode specifies the (addressing) mode of an operand.
const ( Invalid OperandMode = iota // operand is invalid NoValue // operand represents no value (result of a function call w/o result) Builtin // operand is a built-in function TypExpr // operand is a type Constant // operand is a constant; the operand's typ is a Basic type Variable // operand is an addressable variable MapIndex // operand is a map index expression (acts like a variable on lhs, commaok on rhs of an assignment) Value // operand is a computed value CommaOK // like value, but operand may be used in a comma,ok expression CommaErr // like commaok, but second value is error, not boolean CgoFunc // operand is a cgo function )
Click to show internal directories.
Click to hide internal directories.