This repository has been archived on 2022-05-06. You can view files and clone it, but cannot push or open issues/pull-requests.
chromajson/mapping.go

128 lines
6.5 KiB
Go

package chromajson
import "github.com/alecthomas/chroma/v2"
var tokenToType = map[string]chroma.TokenType{
"background": chroma.Background,
"pre_wrapper": chroma.PreWrapper,
"line": chroma.Line,
"line_numbers": chroma.LineNumbers,
"line_numbers_table": chroma.LineNumbersTable,
"line_highlight": chroma.LineHighlight,
"line_table": chroma.LineTable,
"line_table_td": chroma.LineTableTD,
"code_line": chroma.CodeLine,
"error": chroma.Error,
"other": chroma.Other,
"none": chroma.None,
"eof_type": chroma.EOFType,
"keyword": chroma.Keyword,
"keyword_constant": chroma.KeywordConstant,
"keyword_declaration": chroma.KeywordDeclaration,
"keyword_namespace": chroma.KeywordNamespace,
"keyword_pseudo": chroma.KeywordPseudo,
"keyword_reserved": chroma.KeywordReserved,
"keyword_type": chroma.KeywordType,
"name": chroma.Name,
"name_attribute": chroma.NameAttribute,
"name_builtin": chroma.NameBuiltin,
"name_builtin_pseudo": chroma.NameBuiltinPseudo,
"name_class": chroma.NameClass,
"name_constant": chroma.NameConstant,
"name_decorator": chroma.NameDecorator,
"name_entity": chroma.NameEntity,
"name_exception": chroma.NameException,
"name_function": chroma.NameFunction,
"name_function_magic": chroma.NameFunctionMagic,
"name_keyword": chroma.NameKeyword,
"name_label": chroma.NameLabel,
"name_namespace": chroma.NameNamespace,
"name_operator": chroma.NameOperator,
"name_other": chroma.NameOther,
"name_pseudo": chroma.NamePseudo,
"name_property": chroma.NameProperty,
"name_tag": chroma.NameTag,
"name_variable": chroma.NameVariable,
"name_variable_anonymous": chroma.NameVariableAnonymous,
"name_variable_class": chroma.NameVariableClass,
"name_variable_global": chroma.NameVariableGlobal,
"name_variable_instance": chroma.NameVariableInstance,
"name_variable_magic": chroma.NameVariableMagic,
"literal": chroma.Literal,
"literal_date": chroma.LiteralDate,
"literal_other": chroma.LiteralOther,
"literal_string": chroma.LiteralString,
"literal_string_affix": chroma.LiteralStringAffix,
"literal_string_atom": chroma.LiteralStringAtom,
"literal_string_backtick": chroma.LiteralStringBacktick,
"literal_string_boolean": chroma.LiteralStringBoolean,
"literal_string_char": chroma.LiteralStringChar,
"literal_string_delimiter": chroma.LiteralStringDelimiter,
"literal_string_doc": chroma.LiteralStringDoc,
"literal_string_double": chroma.LiteralStringDouble,
"literal_string_escape": chroma.LiteralStringEscape,
"literal_string_heredoc": chroma.LiteralStringHeredoc,
"literal_string_interpol": chroma.LiteralStringInterpol,
"literal_string_name": chroma.LiteralStringName,
"literal_string_other": chroma.LiteralStringOther,
"literal_string_regex": chroma.LiteralStringRegex,
"literal_string_single": chroma.LiteralStringSingle,
"literal_string_symbol": chroma.LiteralStringSymbol,
"literal_number": chroma.LiteralNumber,
"literal_number_bin": chroma.LiteralNumberBin,
"literal_number_float": chroma.LiteralNumberFloat,
"literal_number_hex": chroma.LiteralNumberHex,
"literal_number_integer": chroma.LiteralNumberInteger,
"literal_number_integer_long": chroma.LiteralNumberIntegerLong,
"literal_number_oct": chroma.LiteralNumberOct,
"operator": chroma.Operator,
"operator_word": chroma.OperatorWord,
"punctuation": chroma.Punctuation,
"comment": chroma.Comment,
"comment_hashbang": chroma.CommentHashbang,
"comment_multiline": chroma.CommentMultiline,
"comment_single": chroma.CommentSingle,
"comment_special": chroma.CommentSpecial,
"comment_preproc": chroma.CommentPreproc,
"comment_preproc_file": chroma.CommentPreprocFile,
"generic": chroma.Generic,
"generic_deleted": chroma.GenericDeleted,
"generic_emph": chroma.GenericEmph,
"generic_error": chroma.GenericError,
"generic_heading": chroma.GenericHeading,
"generic_inserted": chroma.GenericInserted,
"generic_output": chroma.GenericOutput,
"generic_prompt": chroma.GenericPrompt,
"generic_strong": chroma.GenericStrong,
"generic_subheading": chroma.GenericSubheading,
"generic_traceback": chroma.GenericTraceback,
"generic_underline": chroma.GenericUnderline,
"text": chroma.Text,
"text_whitespace": chroma.TextWhitespace,
"text_symbol": chroma.TextSymbol,
"text_punctuation": chroma.TextPunctuation,
"whitespace": chroma.Whitespace,
"date": chroma.Date,
"string": chroma.String,
"string_affix": chroma.StringAffix,
"string_backtick": chroma.StringBacktick,
"string_char": chroma.StringChar,
"string_delimiter": chroma.StringDelimiter,
"string_doc": chroma.StringDoc,
"string_double": chroma.StringDouble,
"string_escape": chroma.StringEscape,
"string_heredoc": chroma.StringHeredoc,
"string_interpol": chroma.StringInterpol,
"string_other": chroma.StringOther,
"string_regex": chroma.StringRegex,
"string_single": chroma.StringSingle,
"string_symbol": chroma.StringSymbol,
"number": chroma.Number,
"number_bin": chroma.NumberBin,
"number_float": chroma.NumberFloat,
"number_hex": chroma.NumberHex,
"number_integer": chroma.NumberInteger,
"number_integer_long": chroma.NumberIntegerLong,
"number_oct": chroma.NumberOct,
}