aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/token_string.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-28 15:40:19 -0800
committerMatthew Dempsky <mdempsky@google.com>2020-12-29 02:28:24 +0000
commit3f370b75fb2f31754132271b2879929daa5f88fd (patch)
treef60b47532855b62b06ab1018b36cda078bf0d1a9 /src/cmd/compile/internal/syntax/token_string.go
parent07569dac4e7e03715b4171a46c220cd5d4d6295b (diff)
downloadgo-3f370b75fb2f31754132271b2879929daa5f88fd.tar.gz
go-3f370b75fb2f31754132271b2879929daa5f88fd.zip
[dev.regabi] cmd/compile: cleanup //go:generate directives
During recent refactoring, we moved mkbuiltin.go to package typecheck, but accidentally duplicated its //go:generate directive into a bunch of other files/directories. This CL cleans up the unnecessary duplicates. Also, update all of the stringer invocations to use an explicit file name, and regenerate their files. Updates #43369. Change-Id: I4e493c1fff103d742de0a839d7a3375659270b50 Reviewed-on: https://go-review.googlesource.com/c/go/+/280635 Trust: Matthew Dempsky <mdempsky@google.com> Trust: Meng Zhuo <mzh@golangcn.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax/token_string.go')
-rw-r--r--src/cmd/compile/internal/syntax/token_string.go55
1 files changed, 54 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/syntax/token_string.go b/src/cmd/compile/internal/syntax/token_string.go
index 3cf5473feb..ef295eb24b 100644
--- a/src/cmd/compile/internal/syntax/token_string.go
+++ b/src/cmd/compile/internal/syntax/token_string.go
@@ -1,9 +1,62 @@
-// Code generated by "stringer -type token -linecomment"; DO NOT EDIT.
+// Code generated by "stringer -type token -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[_EOF-1]
+ _ = x[_Name-2]
+ _ = x[_Literal-3]
+ _ = x[_Operator-4]
+ _ = x[_AssignOp-5]
+ _ = x[_IncOp-6]
+ _ = x[_Assign-7]
+ _ = x[_Define-8]
+ _ = x[_Arrow-9]
+ _ = x[_Star-10]
+ _ = x[_Lparen-11]
+ _ = x[_Lbrack-12]
+ _ = x[_Lbrace-13]
+ _ = x[_Rparen-14]
+ _ = x[_Rbrack-15]
+ _ = x[_Rbrace-16]
+ _ = x[_Comma-17]
+ _ = x[_Semi-18]
+ _ = x[_Colon-19]
+ _ = x[_Dot-20]
+ _ = x[_DotDotDot-21]
+ _ = x[_Break-22]
+ _ = x[_Case-23]
+ _ = x[_Chan-24]
+ _ = x[_Const-25]
+ _ = x[_Continue-26]
+ _ = x[_Default-27]
+ _ = x[_Defer-28]
+ _ = x[_Else-29]
+ _ = x[_Fallthrough-30]
+ _ = x[_For-31]
+ _ = x[_Func-32]
+ _ = x[_Go-33]
+ _ = x[_Goto-34]
+ _ = x[_If-35]
+ _ = x[_Import-36]
+ _ = x[_Interface-37]
+ _ = x[_Map-38]
+ _ = x[_Package-39]
+ _ = x[_Range-40]
+ _ = x[_Return-41]
+ _ = x[_Select-42]
+ _ = x[_Struct-43]
+ _ = x[_Switch-44]
+ _ = x[_Type-45]
+ _ = x[_Var-46]
+ _ = x[tokenCount-47]
+}
+
const _token_name = "EOFnameliteralopop=opop=:=<-*([{)]},;:....breakcasechanconstcontinuedefaultdeferelsefallthroughforfuncgogotoifimportinterfacemappackagerangereturnselectstructswitchtypevar"
var _token_index = [...]uint8{0, 3, 7, 14, 16, 19, 23, 24, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 47, 51, 55, 60, 68, 75, 80, 84, 95, 98, 102, 104, 108, 110, 116, 125, 128, 135, 140, 146, 152, 158, 164, 168, 171, 171}