// NewBool returns an OLITERAL representing b as an untyped boolean. func NewBool(pos src.XPos, b bool) Node { … } // NewInt returns an OLITERAL representing v as an untyped integer. func NewInt(pos src.XPos, v int64) Node { … } // NewString returns an OLITERAL representing s as an untyped string. func NewString(pos src.XPos, s string) Node { … } // NewUintptr returns an OLITERAL representing v as a uintptr. func NewUintptr(pos src.XPos, v int64) Node { … } // NewZero returns a zero value of the given type. func NewZero(pos src.XPos, typ *types.Type) Node { … } var intZero … var floatZero … var complexZero … // NewOne returns an OLITERAL representing 1 with the given type. func NewOne(pos src.XPos, typ *types.Type) Node { … } var intOne … var floatOne … var complexOne … const ConstPrec … func BigFloat(v constant.Value) *big.Float { … } // ConstOverflow reports whether constant value v is too large // to represent with type t. func ConstOverflow(v constant.Value, t *types.Type) bool { … } // IsConstNode reports whether n is a Go language constant (as opposed to a // compile-time constant). // // Expressions derived from nil, like string([]byte(nil)), while they // may be known at compile time, are not Go language constants. func IsConstNode(n Node) bool { … } func IsSmallIntConst(n Node) bool { … }