github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/compile/internal/syntax/token_string.go (about)

     1  // Code generated by "stringer -type token -linecomment"; DO NOT EDIT.
     2  
     3  package syntax
     4  
     5  import "strconv"
     6  
     7  const _token_name = "EOFnameliteralopop=opop=:=<-*([{)]},;:....breakcasechanconstcontinuedefaultdeferelsefallthroughforfuncgogotoifimportinterfacemappackagerangereturnselectstructswitchtypevar"
     8  
     9  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}
    10  
    11  func (i token) String() string {
    12  	i -= 1
    13  	if i >= token(len(_token_index)-1) {
    14  		return "token(" + strconv.FormatInt(int64(i+1), 10) + ")"
    15  	}
    16  	return _token_name[_token_index[i]:_token_index[i+1]]
    17  }