mirror of
https://github.com/alecthomas/chroma.git
synced 2025-01-28 03:29:41 +02:00
a10fd0a23d
This makes translating Pygments lexers much much simpler (and possible).
101 lines
4.1 KiB
Go
101 lines
4.1 KiB
Go
// Code generated by "stringer -type TokenType"; DO NOT EDIT.
|
|
|
|
package chroma
|
|
|
|
import "fmt"
|
|
|
|
const _TokenType_name = "EOFNoneOtherErrorEscapeBackgroundKeywordKeywordConstantKeywordDeclarationKeywordNamespaceKeywordPseudoKeywordReservedKeywordTypeNameNameAttributeNameBuiltinNameBuiltinPseudoNameClassNameConstantNameDecoratorNameEntityNameExceptionNameFunctionNameFunctionMagicNamePropertyNameLabelNameNamespaceNameOtherNameOperatorNameTagNameVariableNameVariableClassNameVariableGlobalNameVariableInstanceNameVariableMagicLiteralLiteralDateLiteralStringLiteralStringAffixLiteralStringBacktickLiteralStringCharLiteralStringDelimiterLiteralStringDocLiteralStringDoubleLiteralStringEscapeLiteralStringHeredocLiteralStringInterpolLiteralStringOtherLiteralStringRegexLiteralStringSingleLiteralStringSymbolLiteralStringNameLiteralNumberLiteralNumberBinLiteralNumberFloatLiteralNumberHexLiteralNumberIntegerLiteralNumberIntegerLongLiteralNumberOctOperatorOperatorWordPunctuationCommentCommentHashbangCommentMultilineCommentSingleCommentSpecialCommentPreprocCommentPreprocFileGenericGenericDeletedGenericEmphGenericErrorGenericHeadingGenericInsertedGenericOutputGenericPromptGenericStrongGenericSubheadingGenericTracebackGenericUnderlineTextTextWhitespace"
|
|
|
|
var _TokenType_map = map[TokenType]string{
|
|
-6: _TokenType_name[0:3],
|
|
-5: _TokenType_name[3:7],
|
|
-4: _TokenType_name[7:12],
|
|
-3: _TokenType_name[12:17],
|
|
-2: _TokenType_name[17:23],
|
|
-1: _TokenType_name[23:33],
|
|
1000: _TokenType_name[33:40],
|
|
1001: _TokenType_name[40:55],
|
|
1002: _TokenType_name[55:73],
|
|
1003: _TokenType_name[73:89],
|
|
1004: _TokenType_name[89:102],
|
|
1005: _TokenType_name[102:117],
|
|
1006: _TokenType_name[117:128],
|
|
2000: _TokenType_name[128:132],
|
|
2001: _TokenType_name[132:145],
|
|
2002: _TokenType_name[145:156],
|
|
2003: _TokenType_name[156:173],
|
|
2004: _TokenType_name[173:182],
|
|
2005: _TokenType_name[182:194],
|
|
2006: _TokenType_name[194:207],
|
|
2007: _TokenType_name[207:217],
|
|
2008: _TokenType_name[217:230],
|
|
2009: _TokenType_name[230:242],
|
|
2010: _TokenType_name[242:259],
|
|
2011: _TokenType_name[259:271],
|
|
2012: _TokenType_name[271:280],
|
|
2013: _TokenType_name[280:293],
|
|
2014: _TokenType_name[293:302],
|
|
2015: _TokenType_name[302:314],
|
|
2016: _TokenType_name[314:321],
|
|
2017: _TokenType_name[321:333],
|
|
2018: _TokenType_name[333:350],
|
|
2019: _TokenType_name[350:368],
|
|
2020: _TokenType_name[368:388],
|
|
2021: _TokenType_name[388:405],
|
|
3000: _TokenType_name[405:412],
|
|
3001: _TokenType_name[412:423],
|
|
3100: _TokenType_name[423:436],
|
|
3101: _TokenType_name[436:454],
|
|
3102: _TokenType_name[454:475],
|
|
3103: _TokenType_name[475:492],
|
|
3104: _TokenType_name[492:514],
|
|
3105: _TokenType_name[514:530],
|
|
3106: _TokenType_name[530:549],
|
|
3107: _TokenType_name[549:568],
|
|
3108: _TokenType_name[568:588],
|
|
3109: _TokenType_name[588:609],
|
|
3110: _TokenType_name[609:627],
|
|
3111: _TokenType_name[627:645],
|
|
3112: _TokenType_name[645:664],
|
|
3113: _TokenType_name[664:683],
|
|
3114: _TokenType_name[683:700],
|
|
3200: _TokenType_name[700:713],
|
|
3201: _TokenType_name[713:729],
|
|
3202: _TokenType_name[729:747],
|
|
3203: _TokenType_name[747:763],
|
|
3204: _TokenType_name[763:783],
|
|
3205: _TokenType_name[783:807],
|
|
3206: _TokenType_name[807:823],
|
|
4000: _TokenType_name[823:831],
|
|
4001: _TokenType_name[831:843],
|
|
5000: _TokenType_name[843:854],
|
|
6000: _TokenType_name[854:861],
|
|
6001: _TokenType_name[861:876],
|
|
6002: _TokenType_name[876:892],
|
|
6003: _TokenType_name[892:905],
|
|
6004: _TokenType_name[905:919],
|
|
6100: _TokenType_name[919:933],
|
|
6101: _TokenType_name[933:951],
|
|
7000: _TokenType_name[951:958],
|
|
7001: _TokenType_name[958:972],
|
|
7002: _TokenType_name[972:983],
|
|
7003: _TokenType_name[983:995],
|
|
7004: _TokenType_name[995:1009],
|
|
7005: _TokenType_name[1009:1024],
|
|
7006: _TokenType_name[1024:1037],
|
|
7007: _TokenType_name[1037:1050],
|
|
7008: _TokenType_name[1050:1063],
|
|
7009: _TokenType_name[1063:1080],
|
|
7010: _TokenType_name[1080:1096],
|
|
7011: _TokenType_name[1096:1112],
|
|
8000: _TokenType_name[1112:1116],
|
|
8001: _TokenType_name[1116:1130],
|
|
}
|
|
|
|
func (i TokenType) String() string {
|
|
if str, ok := _TokenType_map[i]; ok {
|
|
return str
|
|
}
|
|
return fmt.Sprintf("TokenType(%d)", i)
|
|
}
|