github.com/bir3/gocompiler@v0.9.2202/src/cmd/compile/internal/syntax/token_string.go (about)

     1  // Code generated by "stringer -type token -linecomment tokens.go"; DO NOT EDIT.
     2  
     3  package syntax
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[_EOF-1]
    12  	_ = x[_Name-2]
    13  	_ = x[_Literal-3]
    14  	_ = x[_Operator-4]
    15  	_ = x[_AssignOp-5]
    16  	_ = x[_IncOp-6]
    17  	_ = x[_Assign-7]
    18  	_ = x[_Define-8]
    19  	_ = x[_Arrow-9]
    20  	_ = x[_Star-10]
    21  	_ = x[_Lparen-11]
    22  	_ = x[_Lbrack-12]
    23  	_ = x[_Lbrace-13]
    24  	_ = x[_Rparen-14]
    25  	_ = x[_Rbrack-15]
    26  	_ = x[_Rbrace-16]
    27  	_ = x[_Comma-17]
    28  	_ = x[_Semi-18]
    29  	_ = x[_Colon-19]
    30  	_ = x[_Dot-20]
    31  	_ = x[_DotDotDot-21]
    32  	_ = x[_Break-22]
    33  	_ = x[_Case-23]
    34  	_ = x[_Chan-24]
    35  	_ = x[_Const-25]
    36  	_ = x[_Continue-26]
    37  	_ = x[_Default-27]
    38  	_ = x[_Defer-28]
    39  	_ = x[_Else-29]
    40  	_ = x[_Fallthrough-30]
    41  	_ = x[_For-31]
    42  	_ = x[_Func-32]
    43  	_ = x[_Go-33]
    44  	_ = x[_Goto-34]
    45  	_ = x[_If-35]
    46  	_ = x[_Import-36]
    47  	_ = x[_Interface-37]
    48  	_ = x[_Map-38]
    49  	_ = x[_Package-39]
    50  	_ = x[_Range-40]
    51  	_ = x[_Return-41]
    52  	_ = x[_Select-42]
    53  	_ = x[_Struct-43]
    54  	_ = x[_Switch-44]
    55  	_ = x[_Type-45]
    56  	_ = x[_Var-46]
    57  	_ = x[tokenCount-47]
    58  }
    59  
    60  const _token_name = "EOFnameliteralopop=opop=:=<-*([{)]},;:....breakcasechanconstcontinuedefaultdeferelsefallthroughforfuncgogotoifimportinterfacemappackagerangereturnselectstructswitchtypevar"
    61  
    62  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}
    63  
    64  func (i token) String() string {
    65  	i -= 1
    66  	if i >= token(len(_token_index)-1) {
    67  		return "token(" + strconv.FormatInt(int64(i+1), 10) + ")"
    68  	}
    69  	return _token_name[_token_index[i]:_token_index[i+1]]
    70  }