json2go/token_type_string.go (view raw)
Oleksandr Smirnov
Oleksandr Smirnov
olexsmir@gmail.com refactor: use an actual parser instead of reflection..., 11 days ago
olexsmir@gmail.com refactor: use an actual parser instead of reflection..., 11 days ago
| 1 | // Code generated by "stringer -output token_type_string.go -type=TokenType"; DO NOT EDIT. |
| 2 | |
| 3 | package json2go |
| 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-0] |
| 12 | _ = x[ILLEGAL-1] |
| 13 | _ = x[NEWLINE-2] |
| 14 | _ = x[INDENT-3] |
| 15 | _ = x[NUMBER-4] |
| 16 | _ = x[DECIMAL-5] |
| 17 | _ = x[STRING-6] |
| 18 | _ = x[BOOL-7] |
| 19 | _ = x[NULL-8] |
| 20 | _ = x[COLON-9] |
| 21 | _ = x[COMMA-10] |
| 22 | _ = x[LBRACE-11] |
| 23 | _ = x[RBRACE-12] |
| 24 | _ = x[LBRACKET-13] |
| 25 | _ = x[RBRACKET-14] |
| 26 | _ = x[COMMENTLINE-15] |
| 27 | _ = x[COMMENTBLOCK-16] |
| 28 | } |
| 29 | |
| 30 | const _TokenType_name = "EOFILLEGALNEWLINEINDENTNUMBERDECIMALSTRINGBOOLNULLCOLONCOMMALBRACERBRACELBRACKETRBRACKETCOMMENTLINECOMMENTBLOCK" |
| 31 | |
| 32 | var _TokenType_index = [...]uint8{0, 3, 10, 17, 23, 29, 36, 42, 46, 50, 55, 60, 66, 72, 80, 88, 99, 111} |
| 33 | |
| 34 | func (i TokenType) String() string { |
| 35 | idx := int(i) - 0 |
| 36 | if i < 0 || idx >= len(_TokenType_index)-1 { |
| 37 | return "TokenType(" + strconv.FormatInt(int64(i), 10) + ")" |
| 38 | } |
| 39 | return _TokenType_name[_TokenType_index[idx]:_TokenType_index[idx+1]] |
| 40 | } |