1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
otto/value_kind.gen.go
Steven Hartland ddcbf14a26
chore: improve error messages (#482)
Improve error messages so we don't just get TypeError with no clue what
the issue was.
2022-12-07 00:13:42 +00:00

32 lines
908 B
Go

// Code generated by "stringer -type=valueKind -trimprefix=value -output=value_kind.gen.go"; DO NOT EDIT.
package otto
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[valueUndefined-0]
_ = x[valueNull-1]
_ = x[valueNumber-2]
_ = x[valueString-3]
_ = x[valueBoolean-4]
_ = x[valueObject-5]
_ = x[valueEmpty-6]
_ = x[valueResult-7]
_ = x[valueReference-8]
}
const _valueKind_name = "UndefinedNullNumberStringBooleanObjectEmptyResultReference"
var _valueKind_index = [...]uint8{0, 9, 13, 19, 25, 32, 38, 43, 49, 58}
func (i valueKind) String() string {
if i < 0 || i >= valueKind(len(_valueKind_index)-1) {
return "valueKind(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _valueKind_name[_valueKind_index[i]:_valueKind_index[i+1]]
}