aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/operator_string.go
blob: a7cd40fb13518658f8bad10c749c497fa131d63f (plain)
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
// Code generated by "stringer -type Operator -linecomment tokens.go"; DO NOT EDIT.

package syntax

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[Def-1]
	_ = x[Not-2]
	_ = x[Recv-3]
	_ = x[OrOr-4]
	_ = x[AndAnd-5]
	_ = x[Eql-6]
	_ = x[Neq-7]
	_ = x[Lss-8]
	_ = x[Leq-9]
	_ = x[Gtr-10]
	_ = x[Geq-11]
	_ = x[Add-12]
	_ = x[Sub-13]
	_ = x[Or-14]
	_ = x[Xor-15]
	_ = x[Mul-16]
	_ = x[Div-17]
	_ = x[Rem-18]
	_ = x[And-19]
	_ = x[AndNot-20]
	_ = x[Shl-21]
	_ = x[Shr-22]
}

const _Operator_name = ":!<-||&&==!=<<=>>=+-|^*/%&&^<<>>"

var _Operator_index = [...]uint8{0, 1, 2, 4, 6, 8, 10, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 30, 32}

func (i Operator) String() string {
	i -= 1
	if i >= Operator(len(_Operator_index)-1) {
		return "Operator(" + strconv.FormatInt(int64(i+1), 10) + ")"
	}
	return _Operator_name[_Operator_index[i]:_Operator_index[i+1]]
}