tokenkind_string.go 2.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
// Code generated by "stringer -type=tokenkind"; DO NOT EDIT.

package expr

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[niltoken-0]
	_ = x[errtoken-1]
	_ = x[eoftoken-2]
	_ = x[identtoken-3]
	_ = x[inttoken-4]
	_ = x[floattoken-5]
	_ = x[booltoken-6]
	_ = x[strtoken-7]
	_ = x[runetoken-8]
	_ = x[addtoken-9]
	_ = x[subtoken-10]
	_ = x[multoken-11]
	_ = x[quotoken-12]
	_ = x[remtoken-13]
	_ = x[andtoken-14]
	_ = x[nottoken-15]
	_ = x[ortoken-16]
	_ = x[xortoken-17]
	_ = x[shltoken-18]
	_ = x[shrtoken-19]
	_ = x[andnottoken-20]
	_ = x[logicalandtoken-21]
	_ = x[logicalortoken-22]
	_ = x[equaltoken-23]
	_ = x[lessertoken-24]
	_ = x[greatertoken-25]
	_ = x[notequaltoken-26]
	_ = x[lesserequaltoken-27]
	_ = x[greaterequaltoken-28]
	_ = x[leftparentoken-29]
	_ = x[leftbrackettoken-30]
	_ = x[commatoken-31]
	_ = x[periodtoken-32]
	_ = x[rightparentoken-33]
	_ = x[rightbrackettoken-34]
	_ = x[colontoken-35]
	_ = x[ternarytoken-36]
	_ = x[boolkeyword-37]
	_ = x[bytekeyword-38]
	_ = x[float32keyword-39]
	_ = x[float64keyword-40]
	_ = x[intkeyword-41]
	_ = x[int8keyword-42]
	_ = x[int16keyword-43]
	_ = x[int32keyword-44]
	_ = x[int64keyword-45]
	_ = x[uintkeyword-46]
	_ = x[uint8keyword-47]
	_ = x[uint16keyword-48]
	_ = x[uint32keyword-49]
	_ = x[uint64keyword-50]
	_ = x[uintptrkeyword-51]
	_ = x[nilkeyword-52]
}

const _tokenkind_name = "niltokenerrtokeneoftokenidenttokeninttokenfloattokenbooltokenstrtokenrunetokenaddtokensubtokenmultokenquotokenremtokenandtokennottokenortokenxortokenshltokenshrtokenandnottokenlogicalandtokenlogicalortokenequaltokenlessertokengreatertokennotequaltokenlesserequaltokengreaterequaltokenleftparentokenleftbrackettokencommatokenperiodtokenrightparentokenrightbrackettokencolontokenternarytokenboolkeywordbytekeywordfloat32keywordfloat64keywordintkeywordint8keywordint16keywordint32keywordint64keyworduintkeyworduint8keyworduint16keyworduint32keyworduint64keyworduintptrkeywordnilkeyword"

var _tokenkind_index = [...]uint16{0, 8, 16, 24, 34, 42, 52, 61, 69, 78, 86, 94, 102, 110, 118, 126, 134, 141, 149, 157, 165, 176, 191, 205, 215, 226, 238, 251, 267, 284, 298, 314, 324, 335, 350, 367, 377, 389, 400, 411, 425, 439, 449, 460, 472, 484, 496, 507, 519, 532, 545, 558, 572, 582}

func (i tokenkind) String() string {
	if i < 0 || i >= tokenkind(len(_tokenkind_index)-1) {
		return "tokenkind(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _tokenkind_name[_tokenkind_index[i]:_tokenkind_index[i+1]]
}