代码拉取完成,页面将自动刷新
// Code generated by "enumer -text -type TokenType"; DO NOT EDIT.
package chroma
import (
"fmt"
"strings"
)
const _TokenTypeName = "NoneOtherErrorCodeLineLineLinkLineTableTDLineTableLineHighlightLineNumbersTableLineNumbersLinePreWrapperBackgroundEOFTypeKeywordKeywordConstantKeywordDeclarationKeywordNamespaceKeywordPseudoKeywordReservedKeywordTypeNameNameAttributeNameBuiltinNameBuiltinPseudoNameClassNameConstantNameDecoratorNameEntityNameExceptionNameFunctionNameFunctionMagicNameKeywordNameLabelNameNamespaceNameOperatorNameOtherNamePseudoNamePropertyNameTagNameVariableNameVariableAnonymousNameVariableClassNameVariableGlobalNameVariableInstanceNameVariableMagicLiteralLiteralDateLiteralOtherLiteralStringLiteralStringAffixLiteralStringAtomLiteralStringBacktickLiteralStringBooleanLiteralStringCharLiteralStringDelimiterLiteralStringDocLiteralStringDoubleLiteralStringEscapeLiteralStringHeredocLiteralStringInterpolLiteralStringNameLiteralStringOtherLiteralStringRegexLiteralStringSingleLiteralStringSymbolLiteralNumberLiteralNumberBinLiteralNumberFloatLiteralNumberHexLiteralNumberIntegerLiteralNumberIntegerLongLiteralNumberOctOperatorOperatorWordPunctuationCommentCommentHashbangCommentMultilineCommentSingleCommentSpecialCommentPreprocCommentPreprocFileGenericGenericDeletedGenericEmphGenericErrorGenericHeadingGenericInsertedGenericOutputGenericPromptGenericStrongGenericSubheadingGenericTracebackGenericUnderlineTextTextWhitespaceTextSymbolTextPunctuation"
const _TokenTypeLowerName = "noneothererrorcodelinelinelinklinetabletdlinetablelinehighlightlinenumberstablelinenumberslineprewrapperbackgroundeoftypekeywordkeywordconstantkeyworddeclarationkeywordnamespacekeywordpseudokeywordreservedkeywordtypenamenameattributenamebuiltinnamebuiltinpseudonameclassnameconstantnamedecoratornameentitynameexceptionnamefunctionnamefunctionmagicnamekeywordnamelabelnamenamespacenameoperatornameothernamepseudonamepropertynametagnamevariablenamevariableanonymousnamevariableclassnamevariableglobalnamevariableinstancenamevariablemagicliteralliteraldateliteralotherliteralstringliteralstringaffixliteralstringatomliteralstringbacktickliteralstringbooleanliteralstringcharliteralstringdelimiterliteralstringdocliteralstringdoubleliteralstringescapeliteralstringheredocliteralstringinterpolliteralstringnameliteralstringotherliteralstringregexliteralstringsingleliteralstringsymbolliteralnumberliteralnumberbinliteralnumberfloatliteralnumberhexliteralnumberintegerliteralnumberintegerlongliteralnumberoctoperatoroperatorwordpunctuationcommentcommenthashbangcommentmultilinecommentsinglecommentspecialcommentpreproccommentpreprocfilegenericgenericdeletedgenericemphgenericerrorgenericheadinggenericinsertedgenericoutputgenericpromptgenericstronggenericsubheadinggenerictracebackgenericunderlinetexttextwhitespacetextsymboltextpunctuation"
var _TokenTypeMap = map[TokenType]string{
-13: _TokenTypeName[0:4],
-12: _TokenTypeName[4:9],
-11: _TokenTypeName[9:14],
-10: _TokenTypeName[14:22],
-9: _TokenTypeName[22:30],
-8: _TokenTypeName[30:41],
-7: _TokenTypeName[41:50],
-6: _TokenTypeName[50:63],
-5: _TokenTypeName[63:79],
-4: _TokenTypeName[79:90],
-3: _TokenTypeName[90:94],
-2: _TokenTypeName[94:104],
-1: _TokenTypeName[104:114],
0: _TokenTypeName[114:121],
1000: _TokenTypeName[121:128],
1001: _TokenTypeName[128:143],
1002: _TokenTypeName[143:161],
1003: _TokenTypeName[161:177],
1004: _TokenTypeName[177:190],
1005: _TokenTypeName[190:205],
1006: _TokenTypeName[205:216],
2000: _TokenTypeName[216:220],
2001: _TokenTypeName[220:233],
2002: _TokenTypeName[233:244],
2003: _TokenTypeName[244:261],
2004: _TokenTypeName[261:270],
2005: _TokenTypeName[270:282],
2006: _TokenTypeName[282:295],
2007: _TokenTypeName[295:305],
2008: _TokenTypeName[305:318],
2009: _TokenTypeName[318:330],
2010: _TokenTypeName[330:347],
2011: _TokenTypeName[347:358],
2012: _TokenTypeName[358:367],
2013: _TokenTypeName[367:380],
2014: _TokenTypeName[380:392],
2015: _TokenTypeName[392:401],
2016: _TokenTypeName[401:411],
2017: _TokenTypeName[411:423],
2018: _TokenTypeName[423:430],
2019: _TokenTypeName[430:442],
2020: _TokenTypeName[442:463],
2021: _TokenTypeName[463:480],
2022: _TokenTypeName[480:498],
2023: _TokenTypeName[498:518],
2024: _TokenTypeName[518:535],
3000: _TokenTypeName[535:542],
3001: _TokenTypeName[542:553],
3002: _TokenTypeName[553:565],
3100: _TokenTypeName[565:578],
3101: _TokenTypeName[578:596],
3102: _TokenTypeName[596:613],
3103: _TokenTypeName[613:634],
3104: _TokenTypeName[634:654],
3105: _TokenTypeName[654:671],
3106: _TokenTypeName[671:693],
3107: _TokenTypeName[693:709],
3108: _TokenTypeName[709:728],
3109: _TokenTypeName[728:747],
3110: _TokenTypeName[747:767],
3111: _TokenTypeName[767:788],
3112: _TokenTypeName[788:805],
3113: _TokenTypeName[805:823],
3114: _TokenTypeName[823:841],
3115: _TokenTypeName[841:860],
3116: _TokenTypeName[860:879],
3200: _TokenTypeName[879:892],
3201: _TokenTypeName[892:908],
3202: _TokenTypeName[908:926],
3203: _TokenTypeName[926:942],
3204: _TokenTypeName[942:962],
3205: _TokenTypeName[962:986],
3206: _TokenTypeName[986:1002],
4000: _TokenTypeName[1002:1010],
4001: _TokenTypeName[1010:1022],
5000: _TokenTypeName[1022:1033],
6000: _TokenTypeName[1033:1040],
6001: _TokenTypeName[1040:1055],
6002: _TokenTypeName[1055:1071],
6003: _TokenTypeName[1071:1084],
6004: _TokenTypeName[1084:1098],
6100: _TokenTypeName[1098:1112],
6101: _TokenTypeName[1112:1130],
7000: _TokenTypeName[1130:1137],
7001: _TokenTypeName[1137:1151],
7002: _TokenTypeName[1151:1162],
7003: _TokenTypeName[1162:1174],
7004: _TokenTypeName[1174:1188],
7005: _TokenTypeName[1188:1203],
7006: _TokenTypeName[1203:1216],
7007: _TokenTypeName[1216:1229],
7008: _TokenTypeName[1229:1242],
7009: _TokenTypeName[1242:1259],
7010: _TokenTypeName[1259:1275],
7011: _TokenTypeName[1275:1291],
8000: _TokenTypeName[1291:1295],
8001: _TokenTypeName[1295:1309],
8002: _TokenTypeName[1309:1319],
8003: _TokenTypeName[1319:1334],
}
func (i TokenType) String() string {
if str, ok := _TokenTypeMap[i]; ok {
return str
}
return fmt.Sprintf("TokenType(%d)", i)
}
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _TokenTypeNoOp() {
var x [1]struct{}
_ = x[None-(-13)]
_ = x[Other-(-12)]
_ = x[Error-(-11)]
_ = x[CodeLine-(-10)]
_ = x[LineLink-(-9)]
_ = x[LineTableTD-(-8)]
_ = x[LineTable-(-7)]
_ = x[LineHighlight-(-6)]
_ = x[LineNumbersTable-(-5)]
_ = x[LineNumbers-(-4)]
_ = x[Line-(-3)]
_ = x[PreWrapper-(-2)]
_ = x[Background-(-1)]
_ = x[EOFType-(0)]
_ = x[Keyword-(1000)]
_ = x[KeywordConstant-(1001)]
_ = x[KeywordDeclaration-(1002)]
_ = x[KeywordNamespace-(1003)]
_ = x[KeywordPseudo-(1004)]
_ = x[KeywordReserved-(1005)]
_ = x[KeywordType-(1006)]
_ = x[Name-(2000)]
_ = x[NameAttribute-(2001)]
_ = x[NameBuiltin-(2002)]
_ = x[NameBuiltinPseudo-(2003)]
_ = x[NameClass-(2004)]
_ = x[NameConstant-(2005)]
_ = x[NameDecorator-(2006)]
_ = x[NameEntity-(2007)]
_ = x[NameException-(2008)]
_ = x[NameFunction-(2009)]
_ = x[NameFunctionMagic-(2010)]
_ = x[NameKeyword-(2011)]
_ = x[NameLabel-(2012)]
_ = x[NameNamespace-(2013)]
_ = x[NameOperator-(2014)]
_ = x[NameOther-(2015)]
_ = x[NamePseudo-(2016)]
_ = x[NameProperty-(2017)]
_ = x[NameTag-(2018)]
_ = x[NameVariable-(2019)]
_ = x[NameVariableAnonymous-(2020)]
_ = x[NameVariableClass-(2021)]
_ = x[NameVariableGlobal-(2022)]
_ = x[NameVariableInstance-(2023)]
_ = x[NameVariableMagic-(2024)]
_ = x[Literal-(3000)]
_ = x[LiteralDate-(3001)]
_ = x[LiteralOther-(3002)]
_ = x[LiteralString-(3100)]
_ = x[LiteralStringAffix-(3101)]
_ = x[LiteralStringAtom-(3102)]
_ = x[LiteralStringBacktick-(3103)]
_ = x[LiteralStringBoolean-(3104)]
_ = x[LiteralStringChar-(3105)]
_ = x[LiteralStringDelimiter-(3106)]
_ = x[LiteralStringDoc-(3107)]
_ = x[LiteralStringDouble-(3108)]
_ = x[LiteralStringEscape-(3109)]
_ = x[LiteralStringHeredoc-(3110)]
_ = x[LiteralStringInterpol-(3111)]
_ = x[LiteralStringName-(3112)]
_ = x[LiteralStringOther-(3113)]
_ = x[LiteralStringRegex-(3114)]
_ = x[LiteralStringSingle-(3115)]
_ = x[LiteralStringSymbol-(3116)]
_ = x[LiteralNumber-(3200)]
_ = x[LiteralNumberBin-(3201)]
_ = x[LiteralNumberFloat-(3202)]
_ = x[LiteralNumberHex-(3203)]
_ = x[LiteralNumberInteger-(3204)]
_ = x[LiteralNumberIntegerLong-(3205)]
_ = x[LiteralNumberOct-(3206)]
_ = x[Operator-(4000)]
_ = x[OperatorWord-(4001)]
_ = x[Punctuation-(5000)]
_ = x[Comment-(6000)]
_ = x[CommentHashbang-(6001)]
_ = x[CommentMultiline-(6002)]
_ = x[CommentSingle-(6003)]
_ = x[CommentSpecial-(6004)]
_ = x[CommentPreproc-(6100)]
_ = x[CommentPreprocFile-(6101)]
_ = x[Generic-(7000)]
_ = x[GenericDeleted-(7001)]
_ = x[GenericEmph-(7002)]
_ = x[GenericError-(7003)]
_ = x[GenericHeading-(7004)]
_ = x[GenericInserted-(7005)]
_ = x[GenericOutput-(7006)]
_ = x[GenericPrompt-(7007)]
_ = x[GenericStrong-(7008)]
_ = x[GenericSubheading-(7009)]
_ = x[GenericTraceback-(7010)]
_ = x[GenericUnderline-(7011)]
_ = x[Text-(8000)]
_ = x[TextWhitespace-(8001)]
_ = x[TextSymbol-(8002)]
_ = x[TextPunctuation-(8003)]
}
var _TokenTypeValues = []TokenType{None, Other, Error, CodeLine, LineLink, LineTableTD, LineTable, LineHighlight, LineNumbersTable, LineNumbers, Line, PreWrapper, Background, EOFType, Keyword, KeywordConstant, KeywordDeclaration, KeywordNamespace, KeywordPseudo, KeywordReserved, KeywordType, Name, NameAttribute, NameBuiltin, NameBuiltinPseudo, NameClass, NameConstant, NameDecorator, NameEntity, NameException, NameFunction, NameFunctionMagic, NameKeyword, NameLabel, NameNamespace, NameOperator, NameOther, NamePseudo, NameProperty, NameTag, NameVariable, NameVariableAnonymous, NameVariableClass, NameVariableGlobal, NameVariableInstance, NameVariableMagic, Literal, LiteralDate, LiteralOther, LiteralString, LiteralStringAffix, LiteralStringAtom, LiteralStringBacktick, LiteralStringBoolean, LiteralStringChar, LiteralStringDelimiter, LiteralStringDoc, LiteralStringDouble, LiteralStringEscape, LiteralStringHeredoc, LiteralStringInterpol, LiteralStringName, LiteralStringOther, LiteralStringRegex, LiteralStringSingle, LiteralStringSymbol, LiteralNumber, LiteralNumberBin, LiteralNumberFloat, LiteralNumberHex, LiteralNumberInteger, LiteralNumberIntegerLong, LiteralNumberOct, Operator, OperatorWord, Punctuation, Comment, CommentHashbang, CommentMultiline, CommentSingle, CommentSpecial, CommentPreproc, CommentPreprocFile, Generic, GenericDeleted, GenericEmph, GenericError, GenericHeading, GenericInserted, GenericOutput, GenericPrompt, GenericStrong, GenericSubheading, GenericTraceback, GenericUnderline, Text, TextWhitespace, TextSymbol, TextPunctuation}
var _TokenTypeNameToValueMap = map[string]TokenType{
_TokenTypeName[0:4]: None,
_TokenTypeLowerName[0:4]: None,
_TokenTypeName[4:9]: Other,
_TokenTypeLowerName[4:9]: Other,
_TokenTypeName[9:14]: Error,
_TokenTypeLowerName[9:14]: Error,
_TokenTypeName[14:22]: CodeLine,
_TokenTypeLowerName[14:22]: CodeLine,
_TokenTypeName[22:30]: LineLink,
_TokenTypeLowerName[22:30]: LineLink,
_TokenTypeName[30:41]: LineTableTD,
_TokenTypeLowerName[30:41]: LineTableTD,
_TokenTypeName[41:50]: LineTable,
_TokenTypeLowerName[41:50]: LineTable,
_TokenTypeName[50:63]: LineHighlight,
_TokenTypeLowerName[50:63]: LineHighlight,
_TokenTypeName[63:79]: LineNumbersTable,
_TokenTypeLowerName[63:79]: LineNumbersTable,
_TokenTypeName[79:90]: LineNumbers,
_TokenTypeLowerName[79:90]: LineNumbers,
_TokenTypeName[90:94]: Line,
_TokenTypeLowerName[90:94]: Line,
_TokenTypeName[94:104]: PreWrapper,
_TokenTypeLowerName[94:104]: PreWrapper,
_TokenTypeName[104:114]: Background,
_TokenTypeLowerName[104:114]: Background,
_TokenTypeName[114:121]: EOFType,
_TokenTypeLowerName[114:121]: EOFType,
_TokenTypeName[121:128]: Keyword,
_TokenTypeLowerName[121:128]: Keyword,
_TokenTypeName[128:143]: KeywordConstant,
_TokenTypeLowerName[128:143]: KeywordConstant,
_TokenTypeName[143:161]: KeywordDeclaration,
_TokenTypeLowerName[143:161]: KeywordDeclaration,
_TokenTypeName[161:177]: KeywordNamespace,
_TokenTypeLowerName[161:177]: KeywordNamespace,
_TokenTypeName[177:190]: KeywordPseudo,
_TokenTypeLowerName[177:190]: KeywordPseudo,
_TokenTypeName[190:205]: KeywordReserved,
_TokenTypeLowerName[190:205]: KeywordReserved,
_TokenTypeName[205:216]: KeywordType,
_TokenTypeLowerName[205:216]: KeywordType,
_TokenTypeName[216:220]: Name,
_TokenTypeLowerName[216:220]: Name,
_TokenTypeName[220:233]: NameAttribute,
_TokenTypeLowerName[220:233]: NameAttribute,
_TokenTypeName[233:244]: NameBuiltin,
_TokenTypeLowerName[233:244]: NameBuiltin,
_TokenTypeName[244:261]: NameBuiltinPseudo,
_TokenTypeLowerName[244:261]: NameBuiltinPseudo,
_TokenTypeName[261:270]: NameClass,
_TokenTypeLowerName[261:270]: NameClass,
_TokenTypeName[270:282]: NameConstant,
_TokenTypeLowerName[270:282]: NameConstant,
_TokenTypeName[282:295]: NameDecorator,
_TokenTypeLowerName[282:295]: NameDecorator,
_TokenTypeName[295:305]: NameEntity,
_TokenTypeLowerName[295:305]: NameEntity,
_TokenTypeName[305:318]: NameException,
_TokenTypeLowerName[305:318]: NameException,
_TokenTypeName[318:330]: NameFunction,
_TokenTypeLowerName[318:330]: NameFunction,
_TokenTypeName[330:347]: NameFunctionMagic,
_TokenTypeLowerName[330:347]: NameFunctionMagic,
_TokenTypeName[347:358]: NameKeyword,
_TokenTypeLowerName[347:358]: NameKeyword,
_TokenTypeName[358:367]: NameLabel,
_TokenTypeLowerName[358:367]: NameLabel,
_TokenTypeName[367:380]: NameNamespace,
_TokenTypeLowerName[367:380]: NameNamespace,
_TokenTypeName[380:392]: NameOperator,
_TokenTypeLowerName[380:392]: NameOperator,
_TokenTypeName[392:401]: NameOther,
_TokenTypeLowerName[392:401]: NameOther,
_TokenTypeName[401:411]: NamePseudo,
_TokenTypeLowerName[401:411]: NamePseudo,
_TokenTypeName[411:423]: NameProperty,
_TokenTypeLowerName[411:423]: NameProperty,
_TokenTypeName[423:430]: NameTag,
_TokenTypeLowerName[423:430]: NameTag,
_TokenTypeName[430:442]: NameVariable,
_TokenTypeLowerName[430:442]: NameVariable,
_TokenTypeName[442:463]: NameVariableAnonymous,
_TokenTypeLowerName[442:463]: NameVariableAnonymous,
_TokenTypeName[463:480]: NameVariableClass,
_TokenTypeLowerName[463:480]: NameVariableClass,
_TokenTypeName[480:498]: NameVariableGlobal,
_TokenTypeLowerName[480:498]: NameVariableGlobal,
_TokenTypeName[498:518]: NameVariableInstance,
_TokenTypeLowerName[498:518]: NameVariableInstance,
_TokenTypeName[518:535]: NameVariableMagic,
_TokenTypeLowerName[518:535]: NameVariableMagic,
_TokenTypeName[535:542]: Literal,
_TokenTypeLowerName[535:542]: Literal,
_TokenTypeName[542:553]: LiteralDate,
_TokenTypeLowerName[542:553]: LiteralDate,
_TokenTypeName[553:565]: LiteralOther,
_TokenTypeLowerName[553:565]: LiteralOther,
_TokenTypeName[565:578]: LiteralString,
_TokenTypeLowerName[565:578]: LiteralString,
_TokenTypeName[578:596]: LiteralStringAffix,
_TokenTypeLowerName[578:596]: LiteralStringAffix,
_TokenTypeName[596:613]: LiteralStringAtom,
_TokenTypeLowerName[596:613]: LiteralStringAtom,
_TokenTypeName[613:634]: LiteralStringBacktick,
_TokenTypeLowerName[613:634]: LiteralStringBacktick,
_TokenTypeName[634:654]: LiteralStringBoolean,
_TokenTypeLowerName[634:654]: LiteralStringBoolean,
_TokenTypeName[654:671]: LiteralStringChar,
_TokenTypeLowerName[654:671]: LiteralStringChar,
_TokenTypeName[671:693]: LiteralStringDelimiter,
_TokenTypeLowerName[671:693]: LiteralStringDelimiter,
_TokenTypeName[693:709]: LiteralStringDoc,
_TokenTypeLowerName[693:709]: LiteralStringDoc,
_TokenTypeName[709:728]: LiteralStringDouble,
_TokenTypeLowerName[709:728]: LiteralStringDouble,
_TokenTypeName[728:747]: LiteralStringEscape,
_TokenTypeLowerName[728:747]: LiteralStringEscape,
_TokenTypeName[747:767]: LiteralStringHeredoc,
_TokenTypeLowerName[747:767]: LiteralStringHeredoc,
_TokenTypeName[767:788]: LiteralStringInterpol,
_TokenTypeLowerName[767:788]: LiteralStringInterpol,
_TokenTypeName[788:805]: LiteralStringName,
_TokenTypeLowerName[788:805]: LiteralStringName,
_TokenTypeName[805:823]: LiteralStringOther,
_TokenTypeLowerName[805:823]: LiteralStringOther,
_TokenTypeName[823:841]: LiteralStringRegex,
_TokenTypeLowerName[823:841]: LiteralStringRegex,
_TokenTypeName[841:860]: LiteralStringSingle,
_TokenTypeLowerName[841:860]: LiteralStringSingle,
_TokenTypeName[860:879]: LiteralStringSymbol,
_TokenTypeLowerName[860:879]: LiteralStringSymbol,
_TokenTypeName[879:892]: LiteralNumber,
_TokenTypeLowerName[879:892]: LiteralNumber,
_TokenTypeName[892:908]: LiteralNumberBin,
_TokenTypeLowerName[892:908]: LiteralNumberBin,
_TokenTypeName[908:926]: LiteralNumberFloat,
_TokenTypeLowerName[908:926]: LiteralNumberFloat,
_TokenTypeName[926:942]: LiteralNumberHex,
_TokenTypeLowerName[926:942]: LiteralNumberHex,
_TokenTypeName[942:962]: LiteralNumberInteger,
_TokenTypeLowerName[942:962]: LiteralNumberInteger,
_TokenTypeName[962:986]: LiteralNumberIntegerLong,
_TokenTypeLowerName[962:986]: LiteralNumberIntegerLong,
_TokenTypeName[986:1002]: LiteralNumberOct,
_TokenTypeLowerName[986:1002]: LiteralNumberOct,
_TokenTypeName[1002:1010]: Operator,
_TokenTypeLowerName[1002:1010]: Operator,
_TokenTypeName[1010:1022]: OperatorWord,
_TokenTypeLowerName[1010:1022]: OperatorWord,
_TokenTypeName[1022:1033]: Punctuation,
_TokenTypeLowerName[1022:1033]: Punctuation,
_TokenTypeName[1033:1040]: Comment,
_TokenTypeLowerName[1033:1040]: Comment,
_TokenTypeName[1040:1055]: CommentHashbang,
_TokenTypeLowerName[1040:1055]: CommentHashbang,
_TokenTypeName[1055:1071]: CommentMultiline,
_TokenTypeLowerName[1055:1071]: CommentMultiline,
_TokenTypeName[1071:1084]: CommentSingle,
_TokenTypeLowerName[1071:1084]: CommentSingle,
_TokenTypeName[1084:1098]: CommentSpecial,
_TokenTypeLowerName[1084:1098]: CommentSpecial,
_TokenTypeName[1098:1112]: CommentPreproc,
_TokenTypeLowerName[1098:1112]: CommentPreproc,
_TokenTypeName[1112:1130]: CommentPreprocFile,
_TokenTypeLowerName[1112:1130]: CommentPreprocFile,
_TokenTypeName[1130:1137]: Generic,
_TokenTypeLowerName[1130:1137]: Generic,
_TokenTypeName[1137:1151]: GenericDeleted,
_TokenTypeLowerName[1137:1151]: GenericDeleted,
_TokenTypeName[1151:1162]: GenericEmph,
_TokenTypeLowerName[1151:1162]: GenericEmph,
_TokenTypeName[1162:1174]: GenericError,
_TokenTypeLowerName[1162:1174]: GenericError,
_TokenTypeName[1174:1188]: GenericHeading,
_TokenTypeLowerName[1174:1188]: GenericHeading,
_TokenTypeName[1188:1203]: GenericInserted,
_TokenTypeLowerName[1188:1203]: GenericInserted,
_TokenTypeName[1203:1216]: GenericOutput,
_TokenTypeLowerName[1203:1216]: GenericOutput,
_TokenTypeName[1216:1229]: GenericPrompt,
_TokenTypeLowerName[1216:1229]: GenericPrompt,
_TokenTypeName[1229:1242]: GenericStrong,
_TokenTypeLowerName[1229:1242]: GenericStrong,
_TokenTypeName[1242:1259]: GenericSubheading,
_TokenTypeLowerName[1242:1259]: GenericSubheading,
_TokenTypeName[1259:1275]: GenericTraceback,
_TokenTypeLowerName[1259:1275]: GenericTraceback,
_TokenTypeName[1275:1291]: GenericUnderline,
_TokenTypeLowerName[1275:1291]: GenericUnderline,
_TokenTypeName[1291:1295]: Text,
_TokenTypeLowerName[1291:1295]: Text,
_TokenTypeName[1295:1309]: TextWhitespace,
_TokenTypeLowerName[1295:1309]: TextWhitespace,
_TokenTypeName[1309:1319]: TextSymbol,
_TokenTypeLowerName[1309:1319]: TextSymbol,
_TokenTypeName[1319:1334]: TextPunctuation,
_TokenTypeLowerName[1319:1334]: TextPunctuation,
}
var _TokenTypeNames = []string{
_TokenTypeName[0:4],
_TokenTypeName[4:9],
_TokenTypeName[9:14],
_TokenTypeName[14:22],
_TokenTypeName[22:30],
_TokenTypeName[30:41],
_TokenTypeName[41:50],
_TokenTypeName[50:63],
_TokenTypeName[63:79],
_TokenTypeName[79:90],
_TokenTypeName[90:94],
_TokenTypeName[94:104],
_TokenTypeName[104:114],
_TokenTypeName[114:121],
_TokenTypeName[121:128],
_TokenTypeName[128:143],
_TokenTypeName[143:161],
_TokenTypeName[161:177],
_TokenTypeName[177:190],
_TokenTypeName[190:205],
_TokenTypeName[205:216],
_TokenTypeName[216:220],
_TokenTypeName[220:233],
_TokenTypeName[233:244],
_TokenTypeName[244:261],
_TokenTypeName[261:270],
_TokenTypeName[270:282],
_TokenTypeName[282:295],
_TokenTypeName[295:305],
_TokenTypeName[305:318],
_TokenTypeName[318:330],
_TokenTypeName[330:347],
_TokenTypeName[347:358],
_TokenTypeName[358:367],
_TokenTypeName[367:380],
_TokenTypeName[380:392],
_TokenTypeName[392:401],
_TokenTypeName[401:411],
_TokenTypeName[411:423],
_TokenTypeName[423:430],
_TokenTypeName[430:442],
_TokenTypeName[442:463],
_TokenTypeName[463:480],
_TokenTypeName[480:498],
_TokenTypeName[498:518],
_TokenTypeName[518:535],
_TokenTypeName[535:542],
_TokenTypeName[542:553],
_TokenTypeName[553:565],
_TokenTypeName[565:578],
_TokenTypeName[578:596],
_TokenTypeName[596:613],
_TokenTypeName[613:634],
_TokenTypeName[634:654],
_TokenTypeName[654:671],
_TokenTypeName[671:693],
_TokenTypeName[693:709],
_TokenTypeName[709:728],
_TokenTypeName[728:747],
_TokenTypeName[747:767],
_TokenTypeName[767:788],
_TokenTypeName[788:805],
_TokenTypeName[805:823],
_TokenTypeName[823:841],
_TokenTypeName[841:860],
_TokenTypeName[860:879],
_TokenTypeName[879:892],
_TokenTypeName[892:908],
_TokenTypeName[908:926],
_TokenTypeName[926:942],
_TokenTypeName[942:962],
_TokenTypeName[962:986],
_TokenTypeName[986:1002],
_TokenTypeName[1002:1010],
_TokenTypeName[1010:1022],
_TokenTypeName[1022:1033],
_TokenTypeName[1033:1040],
_TokenTypeName[1040:1055],
_TokenTypeName[1055:1071],
_TokenTypeName[1071:1084],
_TokenTypeName[1084:1098],
_TokenTypeName[1098:1112],
_TokenTypeName[1112:1130],
_TokenTypeName[1130:1137],
_TokenTypeName[1137:1151],
_TokenTypeName[1151:1162],
_TokenTypeName[1162:1174],
_TokenTypeName[1174:1188],
_TokenTypeName[1188:1203],
_TokenTypeName[1203:1216],
_TokenTypeName[1216:1229],
_TokenTypeName[1229:1242],
_TokenTypeName[1242:1259],
_TokenTypeName[1259:1275],
_TokenTypeName[1275:1291],
_TokenTypeName[1291:1295],
_TokenTypeName[1295:1309],
_TokenTypeName[1309:1319],
_TokenTypeName[1319:1334],
}
// TokenTypeString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func TokenTypeString(s string) (TokenType, error) {
if val, ok := _TokenTypeNameToValueMap[s]; ok {
return val, nil
}
if val, ok := _TokenTypeNameToValueMap[strings.ToLower(s)]; ok {
return val, nil
}
return 0, fmt.Errorf("%s does not belong to TokenType values", s)
}
// TokenTypeValues returns all values of the enum
func TokenTypeValues() []TokenType {
return _TokenTypeValues
}
// TokenTypeStrings returns a slice of all String values of the enum
func TokenTypeStrings() []string {
strs := make([]string, len(_TokenTypeNames))
copy(strs, _TokenTypeNames)
return strs
}
// IsATokenType returns "true" if the value is listed in the enum definition. "false" otherwise
func (i TokenType) IsATokenType() bool {
_, ok := _TokenTypeMap[i]
return ok
}
// MarshalText implements the encoding.TextMarshaler interface for TokenType
func (i TokenType) MarshalText() ([]byte, error) {
return []byte(i.String()), nil
}
// UnmarshalText implements the encoding.TextUnmarshaler interface for TokenType
func (i *TokenType) UnmarshalText(text []byte) error {
var err error
*i, err = TokenTypeString(string(text))
return err
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。