可用的lexer

此页列出了所有可用的内置lexer及其所采用的选项。

目前, 所有lexers 支持以下选项:

stripnl

从输入中删除前导和尾随新行(默认: True

stripall

从输入中删除所有前导空格和尾随空格(默认: False

ensurenl

确保输入以换行符结尾(默认: True )这对于使用输入线条的某些lexer是必需的。

在 1.3 版本加入.

tabsize

如果给定且大于0,则展开输入中的选项卡(默认: 0

encoding

如果给定,则必须是编码名称(例如 "utf-8" )此编码将用于将输入字符串转换为Unicode(如果它不是Unicode字符串)。默认值为 "guess" .

如果此选项设置为 "guess" ,如果设置为,则使用简单的UTF-8与拉丁语-1检测 "chardet" , the chardet library 用于猜测输入的编码。

在 0.6 版本加入.

“short names”字段列出了可与“get-lexer-by-name()”函数一起使用的标识符。

这些lexer是内置的,可以从 pygments.lexers

Lexers for ActionScript and MXML

class pygments.lexers.actionscript.ActionScript3Lexer
短名称:

actionscript3, as3

文件名:

*.as

MIME类型:

application/x-actionscript3, text/x-actionscript3, text/actionscript3

For ActionScript 3 source code.

在 0.11 版本加入.

class pygments.lexers.actionscript.ActionScriptLexer
短名称:

actionscript, as

文件名:

*.as

MIME类型:

application/x-actionscript, text/x-actionscript, text/actionscript

For ActionScript source code.

在 0.9 版本加入.

class pygments.lexers.actionscript.MxmlLexer
短名称:

mxml

文件名:

*.mxml

MIME类型:

None

For MXML markup. Nested AS3 in <script> tags is highlighted by the appropriate lexer.

在 1.1 版本加入.

Lexers for Ada family languages

class pygments.lexers.ada.AdaLexer
短名称:

ada, ada95, ada2005

文件名:

*.adb, *.ads, *.ada

MIME类型:

text/x-ada

For Ada source code.

在 1.3 版本加入.

Lexers for computer algebra systems

class pygments.lexers.algebra.BCLexer
短名称:

bc

文件名:

*.bc

MIME类型:

None

A BC lexer.

在 2.1 版本加入.

class pygments.lexers.algebra.GAPConsoleLexer
短名称:

gap-console, gap-repl

文件名:

*.tst

MIME类型:

None

For GAP console sessions. Modeled after JuliaConsoleLexer.

在 2.14 版本加入.

class pygments.lexers.algebra.GAPLexer
短名称:

gap

文件名:

*.g, *.gd, *.gi, *.gap

MIME类型:

None

For GAP source code.

在 2.0 版本加入.

class pygments.lexers.algebra.MathematicaLexer
短名称:

mathematica, mma, nb

文件名:

*.nb, *.cdf, *.nbp, *.ma

MIME类型:

application/mathematica, application/vnd.wolfram.mathematica, application/vnd.wolfram.mathematica.package, application/vnd.wolfram.cdf

Lexer for Mathematica source code.

在 2.0 版本加入.

class pygments.lexers.algebra.MuPADLexer
短名称:

mupad

文件名:

*.mu

MIME类型:

None

A MuPAD lexer. Contributed by Christopher Creutzig <christopher@creutzig.de>.

在 0.8 版本加入.

Lexers for AmbientTalk language

class pygments.lexers.ambient.AmbientTalkLexer
短名称:

ambienttalk, ambienttalk/2, at

文件名:

*.at

MIME类型:

text/x-ambienttalk

Lexer for AmbientTalk source code.

在 2.0 版本加入.

Lexers for the AMDGPU ISA assembly

class pygments.lexers.amdgpu.AMDGPULexer
短名称:

amdgpu

文件名:

*.isa

MIME类型:

None

For AMD GPU assembly.

在 2.8 版本加入.

Lexers for the AMPL language

class pygments.lexers.ampl.AmplLexer
短名称:

ampl

文件名:

*.run

MIME类型:

None

For AMPL source code.

在 2.2 版本加入.

Lexers for ANSYS Parametric Design Language

class pygments.lexers.apdlexer.apdlexer
短名称:

ansys, apdl

文件名:

*.ans

MIME类型:

None

For APDL source code.

在 2.9 版本加入.

Lexers for APL

class pygments.lexers.apl.APLLexer
短名称:

apl

文件名:

*.apl, *.aplf, *.aplo, *.apln, *.aplc, *.apli, *.dyalog

MIME类型:

None

A simple APL lexer.

在 2.0 版本加入.

Lexer for Arrow

class pygments.lexers.arrow.ArrowLexer
短名称:

arrow

文件名:

*.arw

MIME类型:

None

Lexer for Arrow

在 2.7 版本加入.

Lexer for the Arturo language

class pygments.lexers.arturo.ArturoLexer
短名称:

arturo, art

文件名:

*.art

MIME类型:

None

For Arturo source code.

See Arturo's Github and Arturo's Website.

在 2.14.0 版本加入.

Lexer for various ASCII armored files

class pygments.lexers.asc.AscLexer
短名称:

asc, pem

文件名:

*.asc, *.pem, iddsa, idecdsa, idecdsask, ided25519, ided25519sk, idrsa

MIME类型:

application/pgp-keys, application/pgp-encrypted, application/pgp-signature, application/pem-certificate-chain

Lexer for ASCII armored files, containing -----BEGIN/END ...----- wrapped base64 data.

在 2.10 版本加入.

Lexers for assembly languages

class pygments.lexers.asm.CObjdumpLexer
短名称:

c-objdump

文件名:

*.c-objdump

MIME类型:

text/x-c-objdump

For the output of objdump -Sr on compiled C files.

class pygments.lexers.asm.Ca65Lexer
短名称:

ca65

文件名:

*.s

MIME类型:

None

For ca65 assembler sources.

在 1.6 版本加入.

class pygments.lexers.asm.CppObjdumpLexer
短名称:

cpp-objdump, c++-objdumb, cxx-objdump

文件名:

*.cpp-objdump, *.c++-objdump, *.cxx-objdump

MIME类型:

text/x-cpp-objdump

For the output of objdump -Sr on compiled C++ files.

class pygments.lexers.asm.DObjdumpLexer
短名称:

d-objdump

文件名:

*.d-objdump

MIME类型:

text/x-d-objdump

For the output of objdump -Sr on compiled D files.

class pygments.lexers.asm.Dasm16Lexer
短名称:

dasm16

文件名:

*.dasm16, *.dasm

MIME类型:

text/x-dasm16

For DCPU-16 Assembly.

在 2.4 版本加入.

class pygments.lexers.asm.GasLexer
短名称:

gas, asm

文件名:

*.s, *.S

MIME类型:

text/x-gas

For Gas (AT&T) assembly code.

class pygments.lexers.asm.HsailLexer
短名称:

hsail, hsa

文件名:

*.hsail

MIME类型:

text/x-hsail

For HSAIL assembly code.

在 2.2 版本加入.

class pygments.lexers.asm.LlvmLexer
短名称:

llvm

文件名:

*.ll

MIME类型:

text/x-llvm

For LLVM assembly code.

class pygments.lexers.asm.LlvmMirBodyLexer
短名称:

llvm-mir-body

文件名:

None

MIME类型:

None

For LLVM MIR examples without the YAML wrapper.

在 2.6 版本加入.

class pygments.lexers.asm.LlvmMirLexer
短名称:

llvm-mir

文件名:

*.mir

MIME类型:

None

Lexer for the overall LLVM MIR document format.

MIR is a human readable serialization format that's used to represent LLVM's machine specific intermediate representation. It allows LLVM's developers to see the state of the compilation process at various points, as well as test individual pieces of the compiler.

在 2.6 版本加入.

class pygments.lexers.asm.NasmLexer
短名称:

nasm

文件名:

*.asm, *.ASM, *.nasm

MIME类型:

text/x-nasm

For Nasm (Intel) assembly code.

class pygments.lexers.asm.NasmObjdumpLexer
短名称:

objdump-nasm

文件名:

*.objdump-intel

MIME类型:

text/x-nasm-objdump

For the output of objdump -d -M intel.

在 2.0 版本加入.

class pygments.lexers.asm.ObjdumpLexer
短名称:

objdump

文件名:

*.objdump

MIME类型:

text/x-objdump

For the output of objdump -dr.

class pygments.lexers.asm.TasmLexer
短名称:

tasm

文件名:

*.asm, *.ASM, *.tasm

MIME类型:

text/x-tasm

For Tasm (Turbo Assembler) assembly code.

Pygments lexers for ASN.1

class pygments.lexers.asn1.Asn1Lexer
短名称:

asn1

文件名:

*.asn1

MIME类型:

None

Lexer for ASN.1 module definition

在 2.16 版本加入.

Lexers for automation scripting languages

class pygments.lexers.automation.AutoItLexer
短名称:

autoit

文件名:

*.au3

MIME类型:

text/x-autoit

For AutoIt files.

AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting

在 1.6 版本加入.

class pygments.lexers.automation.AutohotkeyLexer
短名称:

autohotkey, ahk

文件名:

*.ahk, *.ahkl

MIME类型:

text/x-autohotkey

For autohotkey source code.

在 1.4 版本加入.

Lexer for the BARE schema

class pygments.lexers.bare.BareLexer
短名称:

bare

文件名:

*.bare

MIME类型:

None

For BARE schema source.

在 2.7 版本加入.

Lexers for BASIC like languages (other than VB.net)

class pygments.lexers.basic.BBCBasicLexer
短名称:

bbcbasic

文件名:

*.bbc

MIME类型:

None

BBC Basic was supplied on the BBC Micro, and later Acorn RISC OS. It is also used by BBC Basic For Windows.

在 2.4 版本加入.

class pygments.lexers.basic.BlitzBasicLexer
短名称:

blitzbasic, b3d, bplus

文件名:

*.bb, *.decls

MIME类型:

text/x-bb

For BlitzBasic source code.

在 2.0 版本加入.

class pygments.lexers.basic.BlitzMaxLexer
短名称:

blitzmax, bmax

文件名:

*.bmx

MIME类型:

text/x-bmx

For BlitzMax source code.

在 1.4 版本加入.

class pygments.lexers.basic.CbmBasicV2Lexer
短名称:

cbmbas

文件名:

*.bas

MIME类型:

None

For CBM BASIC V2 sources.

在 1.6 版本加入.

class pygments.lexers.basic.MonkeyLexer
短名称:

monkey

文件名:

*.monkey

MIME类型:

text/x-monkey

For Monkey source code.

在 1.6 版本加入.

class pygments.lexers.basic.QBasicLexer
短名称:

qbasic, basic

文件名:

*.BAS, *.bas

MIME类型:

text/basic

For QBasic source code.

在 2.0 版本加入.

class pygments.lexers.basic.VBScriptLexer
短名称:

vbscript

文件名:

*.vbs, *.VBS

MIME类型:

None

VBScript is scripting language that is modeled on Visual Basic.

在 2.4 版本加入.

Lexer for BDD(Behavior-driven development)

class pygments.lexers.bdd.BddLexer
短名称:

bdd

文件名:

*.feature

MIME类型:

text/x-bdd

Lexer for BDD(Behavior-driven development), which highlights not only keywords, but also comments, punctuations, strings, numbers, and variables.

在 2.11 版本加入.

Lexer for Berry

class pygments.lexers.berry.BerryLexer
短名称:

berry, be

文件名:

*.be

MIME类型:

text/x-berry, application/x-berry

For berry source code.

在 2.12.0 版本加入.

Lexers for BibTeX bibliography data and styles

class pygments.lexers.bibtex.BSTLexer
短名称:

bst, bst-pybtex

文件名:

*.bst

MIME类型:

None

A lexer for BibTeX bibliography styles.

在 2.2 版本加入.

class pygments.lexers.bibtex.BibTeXLexer
短名称:

bibtex, bib

文件名:

*.bib

MIME类型:

text/x-bibtex

A lexer for BibTeX bibliography data format.

在 2.2 版本加入.

Lexer for the Blueprint UI markup language

class pygments.lexers.blueprint.BlueprintLexer
短名称:

blueprint

文件名:

*.blp

MIME类型:

text/x-blueprint

For Blueprint UI markup.

在 2.16 版本加入.

Lexers for the Boa language

class pygments.lexers.boa.BoaLexer
短名称:

boa

文件名:

*.boa

MIME类型:

None

Lexer for the Boa language.

在 2.4 版本加入.

Lexer for BQN

class pygments.lexers.bqn.BQNLexer
短名称:

bqn

文件名:

*.bqn

MIME类型:

None

A simple BQN lexer.

在 2.16 版本加入.

Lexers for "business-oriented" languages

class pygments.lexers.business.ABAPLexer
短名称:

abap

文件名:

*.abap, *.ABAP

MIME类型:

text/x-abap

Lexer for ABAP, SAP's integrated language.

在 1.1 版本加入.

class pygments.lexers.business.CobolFreeformatLexer
短名称:

cobolfree

文件名:

*.cbl, *.CBL

MIME类型:

None

Lexer for Free format OpenCOBOL code.

在 1.6 版本加入.

class pygments.lexers.business.CobolLexer
短名称:

cobol

文件名:

*.cob, *.COB, *.cpy, *.CPY

MIME类型:

text/x-cobol

Lexer for OpenCOBOL code.

在 1.6 版本加入.

class pygments.lexers.business.GoodDataCLLexer
短名称:

gooddata-cl

文件名:

*.gdc

MIME类型:

text/x-gooddata-cl

Lexer for GoodData-CL script files.

在 1.4 版本加入.

class pygments.lexers.business.MaqlLexer
短名称:

maql

文件名:

*.maql

MIME类型:

text/x-gooddata-maql, application/x-gooddata-maql

Lexer for GoodData MAQL scripts.

在 1.4 版本加入.

class pygments.lexers.business.OpenEdgeLexer
短名称:

openedge, abl, progress

文件名:

*.p, *.cls

MIME类型:

text/x-openedge, application/x-openedge

Lexer for OpenEdge ABL (formerly Progress) source code.

在 1.5 版本加入.

Lexers for C/C++ languages

class pygments.lexers.c_cpp.CLexer
短名称:

c

文件名:

*.c, *.h, *.idc, *.x[bp]m

MIME类型:

text/x-chdr, text/x-csrc, image/x-xbitmap, image/x-xpixmap

For C source code with preprocessor directives.

Additional options accepted:

stdlibhighlighting

Highlight common types found in the C/C++ standard library (e.g. size_t). (default: True).

c99highlighting

Highlight common types found in the C99 standard library (e.g. int8_t). Actually, this includes all fixed-width integer types. (default: True).

c11highlighting

Highlight atomic types found in the C11 standard library (e.g. atomic_bool). (default: True).

platformhighlighting

Highlight common types found in the platform SDK headers (e.g. clockid_t on Linux). (default: True).

class pygments.lexers.c_cpp.CppLexer
短名称:

cpp, c++

文件名:

*.cpp, *.hpp, *.c++, *.h++, *.cc, *.hh, *.cxx, *.hxx, *.C, *.H, *.cp, *.CPP, *.tpp

MIME类型:

text/x-c++hdr, text/x-c++src

For C++ source code with preprocessor directives.

Additional options accepted:

stdlibhighlighting

Highlight common types found in the C/C++ standard library (e.g. size_t). (default: True).

c99highlighting

Highlight common types found in the C99 standard library (e.g. int8_t). Actually, this includes all fixed-width integer types. (default: True).

c11highlighting

Highlight atomic types found in the C11 standard library (e.g. atomic_bool). (default: True).

platformhighlighting

Highlight common types found in the platform SDK headers (e.g. clockid_t on Linux). (default: True).

Lexers for other C-like languages

class pygments.lexers.c_like.ArduinoLexer
短名称:

arduino

文件名:

*.ino

MIME类型:

text/x-arduino

For Arduino(tm) source.

This is an extension of the CppLexer, as the Arduino® Language is a superset of C++

在 2.1 版本加入.

class pygments.lexers.c_like.CharmciLexer
短名称:

charmci

文件名:

*.ci

MIME类型:

None

For Charm++ interface files (.ci).

在 2.4 版本加入.

class pygments.lexers.c_like.ClayLexer
短名称:

clay

文件名:

*.clay

MIME类型:

text/x-clay

For Clay source.

在 2.0 版本加入.

class pygments.lexers.c_like.CudaLexer
短名称:

cuda, cu

文件名:

*.cu, *.cuh

MIME类型:

text/x-cuda

For NVIDIA CUDA™ source.

在 1.6 版本加入.

class pygments.lexers.c_like.ECLexer
短名称:

ec

文件名:

*.ec, *.eh

MIME类型:

text/x-echdr, text/x-ecsrc

For eC source code with preprocessor directives.

在 1.5 版本加入.

class pygments.lexers.c_like.MqlLexer
短名称:

mql, mq4, mq5, mql4, mql5

文件名:

*.mq4, *.mq5, *.mqh

MIME类型:

text/x-mql

For MQL4 and MQL5 source code.

在 2.0 版本加入.

class pygments.lexers.c_like.NesCLexer
短名称:

nesc

文件名:

*.nc

MIME类型:

text/x-nescsrc

For nesC source code with preprocessor directives.

在 2.0 版本加入.

class pygments.lexers.c_like.OmgIdlLexer
短名称:

omg-idl

文件名:

*.idl, *.pidl

MIME类型:

None

Lexer for Object Management Group Interface Definition Language.

在 2.9 版本加入.

class pygments.lexers.c_like.PikeLexer
短名称:

pike

文件名:

*.pike, *.pmod

MIME类型:

text/x-pike

For Pike source code.

在 2.0 版本加入.

class pygments.lexers.c_like.SwigLexer
短名称:

swig

文件名:

*.swg, *.i

MIME类型:

text/swig

For SWIG source code.

在 2.0 版本加入.

class pygments.lexers.c_like.ValaLexer
短名称:

vala, vapi

文件名:

*.vala, *.vapi

MIME类型:

text/x-vala

For Vala source code with preprocessor directives.

在 1.1 版本加入.

Lexers for the Cap'n Proto schema language

class pygments.lexers.capnproto.CapnProtoLexer
短名称:

capnp

文件名:

*.capnp

MIME类型:

None

For Cap'n Proto source.

在 2.2 版本加入.

Lexers for the Carbon programming language

class pygments.lexers.carbon.CarbonLexer
短名称:

carbon

文件名:

*.carbon

MIME类型:

text/x-carbon

For Carbon source.

在 2.15 版本加入.

Lexer for the Concise data definition language (CDDL), a notational

class pygments.lexers.cddl.CddlLexer
短名称:

cddl

文件名:

*.cddl

MIME类型:

text/x-cddl

Lexer for CDDL definitions.

在 2.8 版本加入.

Lexer for the Chapel language

class pygments.lexers.chapel.ChapelLexer
短名称:

chapel, chpl

文件名:

*.chpl

MIME类型:

None

For Chapel source.

在 2.0 版本加入.

Lexer for the Clean language

class pygments.lexers.clean.CleanLexer
短名称:

clean

文件名:

*.icl, *.dcl

MIME类型:

None

Lexer for the general purpose, state-of-the-art, pure and lazy functional programming language Clean.

Lexer for COMAL-80

class pygments.lexers.comal.Comal80Lexer
短名称:

comal, comal80

文件名:

*.cml, *.comal

MIME类型:

None

For COMAL-80 source code.

Lexers for configuration file formats

class pygments.lexers.configs.ApacheConfLexer
短名称:

apacheconf, aconf, apache

文件名:

.htaccess, apache.conf, apache2.conf

MIME类型:

text/x-apacheconf

Lexer for configuration files following the Apache config file format.

在 0.6 版本加入.

class pygments.lexers.configs.AugeasLexer
短名称:

augeas

文件名:

*.aug

MIME类型:

None

Lexer for Augeas.

在 2.4 版本加入.

class pygments.lexers.configs.Cfengine3Lexer
短名称:

cfengine3, cf3

文件名:

*.cf

MIME类型:

None

Lexer for CFEngine3 policy files.

在 1.5 版本加入.

class pygments.lexers.configs.DesktopLexer
短名称:

desktop

文件名:

*.desktop

MIME类型:

None

Lexer for .desktop files.

在 2.16 版本加入.

class pygments.lexers.configs.DockerLexer
短名称:

docker, dockerfile

文件名:

Dockerfile, *.docker

MIME类型:

text/x-dockerfile-config

Lexer for Docker configuration files.

在 2.0 版本加入.

class pygments.lexers.configs.IniLexer
短名称:

ini, cfg, dosini

文件名:

*.ini, *.cfg, *.inf, .editorconfig

MIME类型:

text/x-ini, text/inf

Lexer for configuration files in INI style.

class pygments.lexers.configs.KconfigLexer
短名称:

kconfig, menuconfig, linux-config, kernel-config

文件名:

Kconfig*, *Config.in*, external.in*, standard-modules.in

MIME类型:

text/x-kconfig

For Linux-style Kconfig files.

在 1.6 版本加入.

class pygments.lexers.configs.LighttpdConfLexer
短名称:

lighttpd, lighty

文件名:

lighttpd.conf

MIME类型:

text/x-lighttpd-conf

Lexer for Lighttpd configuration files.

在 0.11 版本加入.

class pygments.lexers.configs.NestedTextLexer
短名称:

nestedtext, nt

文件名:

*.nt

MIME类型:

None

Lexer for NextedText, a human-friendly data format.

在 2.9 版本加入.

在 2.16 版本发生变更: Added support for NextedText v3.0.

class pygments.lexers.configs.NginxConfLexer
短名称:

nginx

文件名:

nginx.conf

MIME类型:

text/x-nginx-conf

Lexer for Nginx configuration files.

在 0.11 版本加入.

class pygments.lexers.configs.PacmanConfLexer
短名称:

pacmanconf

文件名:

pacman.conf

MIME类型:

None

Lexer for pacman.conf.

Actually, IniLexer works almost fine for this format, but it yield error token. It is because pacman.conf has a form without assignment like:

UseSyslog Color TotalDownload CheckSpace VerbosePkgLists

These are flags to switch on.

在 2.1 版本加入.

class pygments.lexers.configs.PkgConfigLexer
短名称:

pkgconfig

文件名:

*.pc

MIME类型:

None

Lexer for pkg-config (see also manual page).

在 2.1 版本加入.

class pygments.lexers.configs.PropertiesLexer
短名称:

properties, jproperties

文件名:

*.properties

MIME类型:

text/x-java-properties

Lexer for configuration files in Java's properties format.

Note: trailing whitespace counts as part of the value as per spec

在 1.4 版本加入.

class pygments.lexers.configs.RegeditLexer
短名称:

registry

文件名:

*.reg

MIME类型:

text/x-windows-registry

Lexer for Windows Registry files produced by regedit.

在 1.6 版本加入.

class pygments.lexers.configs.SingularityLexer
短名称:

singularity

文件名:

*.def, Singularity

MIME类型:

None

Lexer for Singularity definition files.

在 2.6 版本加入.

class pygments.lexers.configs.SquidConfLexer
短名称:

squidconf, squid.conf, squid

文件名:

squid.conf

MIME类型:

text/x-squidconf

Lexer for squid configuration files.

在 0.9 版本加入.

class pygments.lexers.configs.SystemdLexer
短名称:

systemd

文件名:

*.service, *.socket, *.device, *.mount, *.automount, *.swap, *.target, *.path, *.timer, *.slice, *.scope

MIME类型:

None

Lexer for systemd unit files.

在 2.16 版本加入.

class pygments.lexers.configs.TOMLLexer
短名称:

toml

文件名:

*.toml, Pipfile, poetry.lock

MIME类型:

None

Lexer for TOML, a simple language for config files.

在 2.4 版本加入.

class pygments.lexers.configs.TermcapLexer
短名称:

termcap

文件名:

termcap, termcap.src

MIME类型:

None

Lexer for termcap database source.

This is very simple and minimal.

在 2.1 版本加入.

class pygments.lexers.configs.TerminfoLexer
短名称:

terminfo

文件名:

terminfo, terminfo.src

MIME类型:

None

Lexer for terminfo database source.

This is very simple and minimal.

在 2.1 版本加入.

class pygments.lexers.configs.TerraformLexer
短名称:

terraform, tf, hcl

文件名:

*.tf, *.hcl

MIME类型:

application/x-tf, application/x-terraform

Lexer for terraformi .tf files.

在 2.1 版本加入.

class pygments.lexers.configs.UnixConfigLexer
短名称:

unixconfig, linuxconfig

文件名:

None

MIME类型:

None

Lexer for Unix/Linux config files using colon-separated values, e.g.

  • /etc/group

  • /etc/passwd

  • /etc/shadow

在 2.12 版本加入.

Lexers for misc console output

class pygments.lexers.console.PyPyLogLexer
短名称:

pypylog, pypy

文件名:

*.pypylog

MIME类型:

application/x-pypylog

Lexer for PyPy log files.

在 1.5 版本加入.

class pygments.lexers.console.VCTreeStatusLexer
短名称:

vctreestatus

文件名:

None

MIME类型:

None

For colorizing output of version control status commands, like "hg status" or "svn status".

在 2.0 版本加入.

Lexer for the cplint language

class pygments.lexers.cplint.CplintLexer
短名称:

cplint

文件名:

*.ecl, *.prolog, *.pro, *.pl, *.P, *.lpad, *.cpl

MIME类型:

text/x-cplint

Lexer for cplint files, including CP-logic, Logic Programs with Annotated Disjunctions, Distributional Clauses syntax, ProbLog, DTProbLog.

在 2.12 版本加入.

Lexer for Crystal

class pygments.lexers.crystal.CrystalLexer
短名称:

cr, crystal

文件名:

*.cr

MIME类型:

text/x-crystal

For Crystal source code.

在 2.2 版本加入.

Lexers for Csound languages

class pygments.lexers.csound.CsoundDocumentLexer
短名称:

csound-document, csound-csd

文件名:

*.csd

MIME类型:

None

For Csound documents.

在 2.1 版本加入.

class pygments.lexers.csound.CsoundOrchestraLexer
短名称:

csound, csound-orc

文件名:

*.orc, *.udo

MIME类型:

None

For Csound orchestras.

在 2.1 版本加入.

class pygments.lexers.csound.CsoundScoreLexer
短名称:

csound-score, csound-sco

文件名:

*.sco

MIME类型:

None

For Csound scores.

在 2.1 版本加入.

Lexers for D languages

class pygments.lexers.d.CrocLexer
短名称:

croc

文件名:

*.croc

MIME类型:

text/x-crocsrc

For Croc source.

class pygments.lexers.d.DLexer
短名称:

d

文件名:

*.d, *.di

MIME类型:

text/x-dsrc

For D source.

在 1.2 版本加入.

class pygments.lexers.d.MiniDLexer
短名称:

minid

文件名:

None

MIME类型:

text/x-minidsrc

For MiniD source. MiniD is now known as Croc.

Lexers for data file format

class pygments.lexers.data.JsonBareObjectLexer
短名称:

None

文件名:

None

MIME类型:

None

For JSON data structures (with missing object curly braces).

在 2.2 版本加入.

自 2.8.0 版本弃用: Behaves the same as JsonLexer now.

class pygments.lexers.data.JsonLdLexer
短名称:

jsonld, json-ld

文件名:

*.jsonld

MIME类型:

application/ld+json

For JSON-LD linked data.

在 2.0 版本加入.

class pygments.lexers.data.JsonLexer
短名称:

json, json-object

文件名:

*.json, *.jsonl, *.ndjson, Pipfile.lock

MIME类型:

application/json, application/json-object, application/x-ndjson, application/jsonl, application/json-seq

For JSON data structures.

Javascript-style comments are supported (like /* */ and //), though comments are not part of the JSON specification. This allows users to highlight JSON as it is used in the wild.

No validation is performed on the input JSON document.

在 1.5 版本加入.

class pygments.lexers.data.YamlLexer
短名称:

yaml

文件名:

*.yaml, *.yml

MIME类型:

text/x-yaml

Lexer for YAML, a human-friendly data serialization language.

在 0.11 版本加入.

Lexer for LilyPond

class pygments.lexers.dax.DaxLexer
短名称:

dax

文件名:

*.dax

MIME类型:

None

Lexer for Power BI DAX Referenced from: https://github.com/sql-bi/SyntaxHighlighterBrushDax

在 2.15 版本加入.

Lexers for Devicetree language

class pygments.lexers.devicetree.DevicetreeLexer
短名称:

devicetree, dts

文件名:

*.dts, *.dtsi

MIME类型:

text/x-c

Lexer for Devicetree files.

在 2.7 版本加入.

Lexers for diff/patch formats

class pygments.lexers.diff.DarcsPatchLexer
短名称:

dpatch

文件名:

*.dpatch, *.darcspatch

MIME类型:

None

DarcsPatchLexer is a lexer for the various versions of the darcs patch format. Examples of this format are derived by commands such as darcs annotate --patch and darcs send.

在 0.10 版本加入.

class pygments.lexers.diff.DiffLexer
短名称:

diff, udiff

文件名:

*.diff, *.patch

MIME类型:

text/x-diff, text/x-patch

Lexer for unified or context-style diffs or patches.

class pygments.lexers.diff.WDiffLexer
短名称:

wdiff

文件名:

*.wdiff

MIME类型:

None

A wdiff lexer.

Note that:

  • It only works with normal output (without options like -l).

  • If the target files contain "[-", "-]", "{+", or "+}", especially they are unbalanced, the lexer will get confused.

在 2.2 版本加入.

Pygments lexers for DNS

class pygments.lexers.dns.DnsZoneLexer
短名称:

zone

文件名:

*.zone

MIME类型:

text/dns

Lexer for DNS zone file

在 2.16 版本加入.

Lexers for .net languages

class pygments.lexers.dotnet.BooLexer
短名称:

boo

文件名:

*.boo

MIME类型:

text/x-boo

For Boo source code.

class pygments.lexers.dotnet.CSharpAspxLexer
短名称:

aspx-cs

文件名:

*.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd

MIME类型:

None

Lexer for highlighting C# within ASP.NET pages.

class pygments.lexers.dotnet.CSharpLexer
短名称:

csharp, c#, cs

文件名:

*.cs

MIME类型:

text/x-csharp

For C# source code.

Additional options accepted:

unicodelevel

Determines which Unicode characters this lexer allows for identifiers. The possible values are:

  • none -- only the ASCII letters and numbers are allowed. This is the fastest selection.

  • basic -- all Unicode characters from the specification except category Lo are allowed.

  • full -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the Lo category has more than 40,000 characters in it!

The default value is basic.

在 0.8 版本加入.

class pygments.lexers.dotnet.FSharpLexer
短名称:

fsharp, f#

文件名:

*.fs, *.fsi, *.fsx

MIME类型:

text/x-fsharp

For the F# language (version 3.0).

在 1.5 版本加入.

class pygments.lexers.dotnet.NemerleLexer
短名称:

nemerle

文件名:

*.n

MIME类型:

text/x-nemerle

For Nemerle source code.

Additional options accepted:

unicodelevel

Determines which Unicode characters this lexer allows for identifiers. The possible values are:

  • none -- only the ASCII letters and numbers are allowed. This is the fastest selection.

  • basic -- all Unicode characters from the specification except category Lo are allowed.

  • full -- all Unicode characters as specified in the C# specs are allowed. Note that this means a considerable slowdown since the Lo category has more than 40,000 characters in it!

The default value is basic.

在 1.5 版本加入.

class pygments.lexers.dotnet.VbNetAspxLexer
短名称:

aspx-vb

文件名:

*.aspx, *.asax, *.ascx, *.ashx, *.asmx, *.axd

MIME类型:

None

Lexer for highlighting Visual Basic.net within ASP.NET pages.

class pygments.lexers.dotnet.VbNetLexer
短名称:

vb.net, vbnet, lobas, oobas, sobas

文件名:

*.vb, *.bas

MIME类型:

text/x-vbnet, text/x-vba

For Visual Basic.NET source code. Also LibreOffice Basic, OpenOffice Basic, and StarOffice Basic.

class pygments.lexers.dotnet.XppLexer
短名称:

xpp, x++

文件名:

*.xpp

MIME类型:

None

For X++ source code. This is based loosely on the CSharpLexer

在 2.15 版本加入.

Lexers for various domain-specific languages

class pygments.lexers.dsls.AlloyLexer
短名称:

alloy

文件名:

*.als

MIME类型:

text/x-alloy

For Alloy source code.

在 2.0 版本加入.

class pygments.lexers.dsls.CrmshLexer
短名称:

crmsh, pcmk

文件名:

*.crmsh, *.pcmk

MIME类型:

None

Lexer for crmsh configuration files for Pacemaker clusters.

在 2.1 版本加入.

class pygments.lexers.dsls.FlatlineLexer
短名称:

flatline

文件名:

None

MIME类型:

text/x-flatline

Lexer for Flatline expressions.

在 2.2 版本加入.

class pygments.lexers.dsls.MscgenLexer
短名称:

mscgen, msc

文件名:

*.msc

MIME类型:

None

For Mscgen files.

在 1.6 版本加入.

class pygments.lexers.dsls.PanLexer
短名称:

pan

文件名:

*.pan

MIME类型:

None

Lexer for pan source files.

Based on tcsh lexer.

在 2.0 版本加入.

class pygments.lexers.dsls.ProtoBufLexer
短名称:

protobuf, proto

文件名:

*.proto

MIME类型:

None

Lexer for Protocol Buffer definition files.

在 1.4 版本加入.

class pygments.lexers.dsls.PuppetLexer
短名称:

puppet

文件名:

*.pp

MIME类型:

None

For Puppet configuration DSL.

在 1.6 版本加入.

class pygments.lexers.dsls.RslLexer
短名称:

rsl

文件名:

*.rsl

MIME类型:

text/rsl

RSL is the formal specification language used in RAISE (Rigorous Approach to Industrial Software Engineering) method.

在 2.0 版本加入.

class pygments.lexers.dsls.SnowballLexer
短名称:

snowball

文件名:

*.sbl

MIME类型:

None

Lexer for Snowball source code.

在 2.2 版本加入.

class pygments.lexers.dsls.ThriftLexer
短名称:

thrift

文件名:

*.thrift

MIME类型:

application/x-thrift

For Thrift interface definitions.

在 2.1 版本加入.

class pygments.lexers.dsls.VGLLexer
短名称:

vgl

文件名:

*.rpf

MIME类型:

None

For SampleManager VGL source code.

在 1.6 版本加入.

class pygments.lexers.dsls.ZeekLexer
短名称:

zeek, bro

文件名:

*.zeek, *.bro

MIME类型:

None

For Zeek scripts.

在 2.5 版本加入.

Lexers for the Dylan language

class pygments.lexers.dylan.DylanConsoleLexer
短名称:

dylan-console, dylan-repl

文件名:

*.dylan-console

MIME类型:

text/x-dylan-console

For Dylan interactive console output.

This is based on a copy of the RubyConsoleLexer.

在 1.6 版本加入.

Example

? let a = 1;
=> 1
? a
=> 1
class pygments.lexers.dylan.DylanLexer
短名称:

dylan

文件名:

*.dylan, *.dyl, *.intr

MIME类型:

text/x-dylan

For the Dylan language.

在 0.7 版本加入.

class pygments.lexers.dylan.DylanLidLexer
短名称:

dylan-lid, lid

文件名:

*.lid, *.hdp

MIME类型:

text/x-dylan-lid

For Dylan LID (Library Interchange Definition) files.

在 1.6 版本加入.

Lexers for the ECL language

class pygments.lexers.ecl.ECLLexer
短名称:

ecl

文件名:

*.ecl

MIME类型:

application/x-ecl

Lexer for the declarative big-data ECL language.

在 1.5 版本加入.

Lexer for the Eiffel language

class pygments.lexers.eiffel.EiffelLexer
短名称:

eiffel

文件名:

*.e

MIME类型:

text/x-eiffel

For Eiffel source code.

在 2.0 版本加入.

Lexer for the Elm programming language

class pygments.lexers.elm.ElmLexer
短名称:

elm

文件名:

*.elm

MIME类型:

text/x-elm

For Elm source code.

在 2.1 版本加入.

Lexer for the Elpi programming language

class pygments.lexers.elpi.ElpiLexer
短名称:

elpi

文件名:

*.elpi

MIME类型:

text/x-elpi

Lexer for the Elpi programming language.

在 2.11 版本加入.

Lexer for the raw E-mail

class pygments.lexers.email.EmailLexer
短名称:

email, eml

文件名:

*.eml

MIME类型:

message/rfc822

Lexer for raw E-mail.

Additional options accepted:

highlight-X-header

Highlight the fields of X- user-defined email header. (default: False).

在 2.5 版本加入.

Lexers for Erlang

class pygments.lexers.erlang.ElixirConsoleLexer
短名称:

iex

文件名:

None

MIME类型:

text/x-elixir-shellsession

For Elixir interactive console (iex) output like:

iex> [head | tail] = [1,2,3]
[1,2,3]
iex> head
1
iex> tail
[2,3]
iex> [head | tail]
[1,2,3]
iex> length [head | tail]
3

在 1.5 版本加入.

class pygments.lexers.erlang.ElixirLexer
短名称:

elixir, ex, exs

文件名:

*.ex, *.eex, *.exs, *.leex

MIME类型:

text/x-elixir

For the Elixir language.

在 1.5 版本加入.

class pygments.lexers.erlang.ErlangLexer
短名称:

erlang

文件名:

*.erl, *.hrl, *.es, *.escript

MIME类型:

text/x-erlang

For the Erlang functional programming language.

在 0.9 版本加入.

class pygments.lexers.erlang.ErlangShellLexer
短名称:

erl

文件名:

*.erl-sh

MIME类型:

text/x-erl-shellsession

Shell sessions in erl (for Erlang code).

在 1.1 版本加入.

Lexers for esoteric languages

class pygments.lexers.esoteric.AheuiLexer
短名称:

aheui

文件名:

*.aheui

MIME类型:

None

Aheui is esoteric language based on Korean alphabets.

class pygments.lexers.esoteric.BefungeLexer
短名称:

befunge

文件名:

*.befunge

MIME类型:

application/x-befunge

Lexer for the esoteric Befunge language.

在 0.7 版本加入.

class pygments.lexers.esoteric.BrainfuckLexer
短名称:

brainfuck, bf

文件名:

*.bf, *.b

MIME类型:

application/x-brainfuck

Lexer for the esoteric BrainFuck language.

class pygments.lexers.esoteric.CAmkESLexer
短名称:

camkes, idl4

文件名:

*.camkes, *.idl4

MIME类型:

None

Basic lexer for the input language for the CAmkES component platform.

在 2.1 版本加入.

class pygments.lexers.esoteric.CapDLLexer
短名称:

capdl

文件名:

*.cdl

MIME类型:

None

Basic lexer for CapDL.

The source of the primary tool that reads such specifications is available at https://github.com/seL4/capdl/tree/master/capDL-tool. Note that this lexer only supports a subset of the grammar. For example, identifiers can shadow type names, but these instances are currently incorrectly highlighted as types. Supporting this would need a stateful lexer that is considered unnecessarily complex for now.

在 2.2 版本加入.

class pygments.lexers.esoteric.RedcodeLexer
短名称:

redcode

文件名:

*.cw

MIME类型:

None

A simple Redcode lexer based on ICWS'94. Contributed by Adam Blinkinsop <blinks@acm.org>.

在 0.8 版本加入.

Pygments lexers for Ezhil language

class pygments.lexers.ezhil.EzhilLexer
短名称:

ezhil

文件名:

*.n

MIME类型:

text/x-ezhil

Lexer for Ezhil, a Tamil script-based programming language.

在 2.1 版本加入.

Lexers for the Factor language

class pygments.lexers.factor.FactorLexer
短名称:

factor

文件名:

*.factor

MIME类型:

text/x-factor

Lexer for the Factor language.

在 1.4 版本加入.

Lexer for the Fantom language

class pygments.lexers.fantom.FantomLexer
短名称:

fan

文件名:

*.fan

MIME类型:

application/x-fantom

For Fantom source code.

在 1.5 版本加入.

Lexer for the Felix language

class pygments.lexers.felix.FelixLexer
短名称:

felix, flx

文件名:

*.flx, *.flxh

MIME类型:

text/x-felix

For Felix source code.

在 1.2 版本加入.

Lexers for fift

class pygments.lexers.fift.FiftLexer
短名称:

fift, fif

文件名:

*.fif

MIME类型:

None

For Fift source code.

Lexer for FloScript

class pygments.lexers.floscript.FloScriptLexer
短名称:

floscript, flo

文件名:

*.flo

MIME类型:

None

For FloScript configuration language source code.

在 2.4 版本加入.

Lexer for the Forth language

class pygments.lexers.forth.ForthLexer
短名称:

forth

文件名:

*.frt, *.fs

MIME类型:

application/x-forth

Lexer for Forth files.

在 2.2 版本加入.

Lexers for Fortran languages

class pygments.lexers.fortran.FortranFixedLexer
短名称:

fortranfixed

文件名:

*.f, *.F

MIME类型:

None

Lexer for fixed format Fortran.

在 2.1 版本加入.

class pygments.lexers.fortran.FortranLexer
短名称:

fortran, f90

文件名:

*.f03, *.f90, *.F03, *.F90

MIME类型:

text/x-fortran

Lexer for FORTRAN 90 code.

在 0.10 版本加入.

Simple lexer for Microsoft Visual FoxPro source code

class pygments.lexers.foxpro.FoxProLexer
短名称:

foxpro, vfp, clipper, xbase

文件名:

*.PRG, *.prg

MIME类型:

None

Lexer for Microsoft Visual FoxPro language.

FoxPro syntax allows to shorten all keywords and function names to 4 characters. Shortened forms are not recognized by this lexer.

在 1.6 版本加入.

Lexer for FreeFem++ language

class pygments.lexers.freefem.FreeFemLexer
短名称:

freefem

文件名:

*.edp

MIME类型:

text/x-freefem

For FreeFem++ source.

This is an extension of the CppLexer, as the FreeFem Language is a superset of C++.

在 2.4 版本加入.

Lexers for FunC

class pygments.lexers.func.FuncLexer
短名称:

func, fc

文件名:

*.fc, *.func

MIME类型:

None

For FunC source code.

Lexer for the Futhark language

class pygments.lexers.futhark.FutharkLexer
短名称:

futhark

文件名:

*.fut

MIME类型:

text/x-futhark

A Futhark lexer

在 2.8 版本加入.

Lexers for the G Code Language

class pygments.lexers.gcodelexer.GcodeLexer
短名称:

gcode

文件名:

*.gcode

MIME类型:

None

For gcode source code.

在 2.9 版本加入.

Lexer for GDScript

class pygments.lexers.gdscript.GDScriptLexer
短名称:

gdscript, gd

文件名:

*.gd

MIME类型:

text/x-gdscript, application/x-gdscript

For GDScript source code.

Lexers for the Google Go language

class pygments.lexers.go.GoLexer
短名称:

go, golang

文件名:

*.go

MIME类型:

text/x-gosrc

For Go source.

在 1.2 版本加入.

Lexers for grammar notations like BNF

class pygments.lexers.grammar_notation.AbnfLexer
短名称:

abnf

文件名:

*.abnf

MIME类型:

text/x-abnf

Lexer for IETF 7405 ABNF.

(Updates 5234) grammars.

在 2.1 版本加入.

class pygments.lexers.grammar_notation.BnfLexer
短名称:

bnf

文件名:

*.bnf

MIME类型:

text/x-bnf

This lexer is for grammar notations which are similar to original BNF.

In order to maximize a number of targets of this lexer, let's decide some designs:

  • We don't distinguish Terminal Symbol.

  • We do assume that NonTerminal Symbol are always enclosed with arrow brackets.

  • We do assume that NonTerminal Symbol may include any printable characters except arrow brackets and ASCII 0x20. This assumption is for RBNF.

  • We do assume that target notation doesn't support comment.

  • We don't distinguish any operators and punctuation except ::=.

Though these decision making might cause too minimal highlighting and you might be disappointed, but it is reasonable for us.

在 2.1 版本加入.

class pygments.lexers.grammar_notation.JsgfLexer
短名称:

jsgf

文件名:

*.jsgf

MIME类型:

application/jsgf, application/x-jsgf, text/jsgf

For JSpeech Grammar Format grammars.

在 2.2 版本加入.

class pygments.lexers.grammar_notation.PegLexer
短名称:

peg

文件名:

*.peg

MIME类型:

text/x-peg

This lexer is for Parsing Expression Grammars (PEG).

Various implementations of PEG have made different decisions regarding the syntax, so let's try to be accommodating:

  • <-, , :, and = are all accepted as rule operators.

  • Both | and / are choice operators.

  • ^, , and ~ are cut operators.

  • A single a-z character immediately before a string, or multiple a-z characters following a string, are part of the string (e.g., r"..." or "..."ilmsuxa).

在 2.6 版本加入.

Lexers for graph query languages

class pygments.lexers.graph.CypherLexer
短名称:

cypher

文件名:

*.cyp, *.cypher

MIME类型:

None

For Cypher Query Language

For the Cypher version in Neo4j 3.3

在 2.0 版本加入.

Lexer for GraphQL, an open-source data query and manipulation

class pygments.lexers.graphql.GraphQLLexer
短名称:

graphql

文件名:

*.graphql

MIME类型:

None

Lexer for GraphQL syntax

在 2.16 版本加入.

Lexer for the DOT language (graphviz)

class pygments.lexers.graphviz.GraphvizLexer
短名称:

graphviz, dot

文件名:

*.gv, *.dot

MIME类型:

text/x-graphviz, text/vnd.graphviz

For graphviz DOT graph description language.

在 2.8 版本加入.

Lexers for TigerGraph GSQL graph query language

class pygments.lexers.gsql.GSQLLexer
短名称:

gsql

文件名:

*.gsql

MIME类型:

None

For GSQL queries (version 3.x).

在 2.10 版本加入.

Lexers for hardware descriptor languages

class pygments.lexers.hdl.SystemVerilogLexer
短名称:

systemverilog, sv

文件名:

*.sv, *.svh

MIME类型:

text/x-systemverilog

Extends verilog lexer to recognise all SystemVerilog keywords from IEEE 1800-2009 standard.

在 1.5 版本加入.

class pygments.lexers.hdl.VerilogLexer
短名称:

verilog, v

文件名:

*.v

MIME类型:

text/x-verilog

For verilog source code with preprocessor directives.

在 1.4 版本加入.

class pygments.lexers.hdl.VhdlLexer
短名称:

vhdl

文件名:

*.vhdl, *.vhd

MIME类型:

text/x-vhdl

For VHDL source code.

在 1.5 版本加入.

Lexers for hexadecimal dumps

class pygments.lexers.hexdump.HexdumpLexer
短名称:

hexdump

文件名:

None

MIME类型:

None

For typical hex dump output formats by the UNIX and GNU/Linux tools hexdump, hd, hexcat, od and xxd, and the DOS tool DEBUG. For example:

00000000  7f 45 4c 46 02 01 01 00  00 00 00 00 00 00 00 00  |.ELF............|
00000010  02 00 3e 00 01 00 00 00  c5 48 40 00 00 00 00 00  |..>......H@.....|

The specific supported formats are the outputs of:

  • hexdump FILE

  • hexdump -C FILE -- the canonical format used in the example.

  • hd FILE -- same as hexdump -C FILE.

  • hexcat FILE

  • od -t x1z FILE

  • xxd FILE

  • DEBUG.EXE FILE.COM and entering d to the prompt.

在 2.1 版本加入.

Lexers for IDL

class pygments.lexers.idl.IDLLexer
短名称:

idl

文件名:

*.pro

MIME类型:

text/idl

Pygments Lexer for IDL (Interactive Data Language).

在 1.6 版本加入.

Lexers for Igor Pro

class pygments.lexers.igor.IgorLexer
短名称:

igor, igorpro

文件名:

*.ipf

MIME类型:

text/ipf

Pygments Lexer for Igor Pro procedure files (.ipf). See http://www.wavemetrics.com/ and http://www.igorexchange.com/.

在 2.0 版本加入.

Lexers for installer/packager DSLs and formats

class pygments.lexers.installers.DebianControlLexer
短名称:

debcontrol, control

文件名:

control

MIME类型:

None

Lexer for Debian control files and apt-cache show <pkg> outputs.

在 0.9 版本加入.

class pygments.lexers.installers.NSISLexer
短名称:

nsis, nsi, nsh

文件名:

*.nsi, *.nsh

MIME类型:

text/x-nsis

For NSIS scripts.

在 1.6 版本加入.

class pygments.lexers.installers.RPMSpecLexer
短名称:

spec

文件名:

*.spec

MIME类型:

text/x-rpm-spec

For RPM .spec files.

在 1.6 版本加入.

class pygments.lexers.installers.SourcesListLexer
短名称:

debsources, sourceslist, sources.list

文件名:

sources.list

MIME类型:

None

Lexer that highlights debian sources.list files.

在 0.7 版本加入.

Lexers for interactive fiction languages

class pygments.lexers.int_fiction.Inform6Lexer
短名称:

inform6, i6

文件名:

*.inf

MIME类型:

None

For Inform 6 source code.

在 2.0 版本加入.

class pygments.lexers.int_fiction.Inform6TemplateLexer
短名称:

i6t

文件名:

*.i6t

MIME类型:

None

For Inform 6 template code.

在 2.0 版本加入.

class pygments.lexers.int_fiction.Inform7Lexer
短名称:

inform7, i7

文件名:

*.ni, *.i7x

MIME类型:

None

For Inform 7 source code.

在 2.0 版本加入.

class pygments.lexers.int_fiction.Tads3Lexer
短名称:

tads3

文件名:

*.t

MIME类型:

None

For TADS 3 source code.

Lexers for the Io language

class pygments.lexers.iolang.IoLexer
短名称:

io

文件名:

*.io

MIME类型:

text/x-iosrc

For Io (a small, prototype-based programming language) source.

在 0.10 版本加入.

Lexer for the J programming language

class pygments.lexers.j.JLexer
短名称:

j

文件名:

*.ijs

MIME类型:

text/x-j

For J source code.

在 2.1 版本加入.

Lexers for the JMESPath language

class pygments.lexers.jmespath.JMESPathLexer
短名称:

jmespath, jp

文件名:

*.jp

MIME类型:

None

For JMESPath queries.

Lexers for the JSLT language

class pygments.lexers.jslt.JSLTLexer
短名称:

jslt

文件名:

*.jslt

MIME类型:

text/x-jslt

For JSLT source.

在 2.10 版本加入.

Lexer for Jsonnet data templating language

class pygments.lexers.jsonnet.JsonnetLexer
短名称:

jsonnet

文件名:

*.jsonnet, *.libsonnet

MIME类型:

None

Lexer for Jsonnet source code.

Lexers for the Julia language

class pygments.lexers.julia.JuliaConsoleLexer
短名称:

jlcon, julia-repl

文件名:

None

MIME类型:

None

For Julia console sessions. Modeled after MatlabSessionLexer.

在 1.6 版本加入.

class pygments.lexers.julia.JuliaLexer
短名称:

julia, jl

文件名:

*.jl

MIME类型:

text/x-julia, application/x-julia

For Julia source code.

在 1.6 版本加入.

Pygments lexers for JVM languages

class pygments.lexers.jvm.AspectJLexer
短名称:

aspectj

文件名:

*.aj

MIME类型:

text/x-aspectj

For AspectJ source code.

在 1.6 版本加入.

class pygments.lexers.jvm.CeylonLexer
短名称:

ceylon

文件名:

*.ceylon

MIME类型:

text/x-ceylon

For Ceylon source code.

在 1.6 版本加入.

class pygments.lexers.jvm.ClojureLexer
短名称:

clojure, clj

文件名:

*.clj, *.cljc

MIME类型:

text/x-clojure, application/x-clojure

Lexer for Clojure source code.

在 0.11 版本加入.

class pygments.lexers.jvm.ClojureScriptLexer
短名称:

clojurescript, cljs

文件名:

*.cljs

MIME类型:

text/x-clojurescript, application/x-clojurescript

Lexer for ClojureScript source code.

在 2.0 版本加入.

class pygments.lexers.jvm.GoloLexer
短名称:

golo

文件名:

*.golo

MIME类型:

None

For Golo source code.

在 2.0 版本加入.

class pygments.lexers.jvm.GosuLexer
短名称:

gosu

文件名:

*.gs, *.gsx, *.gsp, *.vark

MIME类型:

text/x-gosu

For Gosu source code.

在 1.5 版本加入.

class pygments.lexers.jvm.GosuTemplateLexer
短名称:

gst

文件名:

*.gst

MIME类型:

text/x-gosu-template

For Gosu templates.

在 1.5 版本加入.

class pygments.lexers.jvm.GroovyLexer
短名称:

groovy

文件名:

*.groovy, *.gradle

MIME类型:

text/x-groovy

For Groovy source code.

在 1.5 版本加入.

class pygments.lexers.jvm.IokeLexer
短名称:

ioke, ik

文件名:

*.ik

MIME类型:

text/x-iokesrc

For Ioke (a strongly typed, dynamic, prototype based programming language) source.

在 1.4 版本加入.

class pygments.lexers.jvm.JasminLexer
短名称:

jasmin, jasminxt

文件名:

*.j

MIME类型:

None

For Jasmin assembly code.

在 2.0 版本加入.

class pygments.lexers.jvm.JavaLexer
短名称:

java

文件名:

*.java

MIME类型:

text/x-java

For Java source code.

class pygments.lexers.jvm.KotlinLexer
短名称:

kotlin

文件名:

*.kt, *.kts

MIME类型:

text/x-kotlin

For Kotlin source code.

在 1.5 版本加入.

class pygments.lexers.jvm.PigLexer
短名称:

pig

文件名:

*.pig

MIME类型:

text/x-pig

For Pig Latin source code.

在 2.0 版本加入.

class pygments.lexers.jvm.SarlLexer
短名称:

sarl

文件名:

*.sarl

MIME类型:

text/x-sarl

For SARL source code.

在 2.4 版本加入.

class pygments.lexers.jvm.ScalaLexer
短名称:

scala

文件名:

*.scala

MIME类型:

text/x-scala

For Scala source code.

class pygments.lexers.jvm.XtendLexer
短名称:

xtend

文件名:

*.xtend

MIME类型:

text/x-xtend

For Xtend source code.

在 1.6 版本加入.

Lexers for the Kuin language

class pygments.lexers.kuin.KuinLexer
短名称:

kuin

文件名:

*.kn

MIME类型:

None

For Kuin source code.

在 2.9 版本加入.

Pygments lexers for LDAP

class pygments.lexers.ldap.LdifLexer
短名称:

ldif

文件名:

*.ldif

MIME类型:

text/x-ldif

Lexer for LDIF

在 2.17 版本加入.

Lexer for LilyPond

class pygments.lexers.lilypond.LilyPondLexer
短名称:

lilypond

文件名:

*.ly

MIME类型:

None

Lexer for input to LilyPond, a text-based music typesetter.

重要

This lexer is meant to be used in conjunction with the lilypond style.

在 2.11 版本加入.

Lexers for Lispy languages

class pygments.lexers.lisp.CPSALexer
短名称:

cpsa

文件名:

*.cpsa

MIME类型:

None

A CPSA lexer based on the CPSA language as of version 2.2.12

在 2.1 版本加入.

class pygments.lexers.lisp.CommonLispLexer
短名称:

common-lisp, cl, lisp

文件名:

*.cl, *.lisp

MIME类型:

text/x-common-lisp

A Common Lisp lexer.

在 0.9 版本加入.

class pygments.lexers.lisp.EmacsLispLexer
短名称:

emacs-lisp, elisp, emacs

文件名:

*.el

MIME类型:

text/x-elisp, application/x-elisp

An ELisp lexer, parsing a stream and outputting the tokens needed to highlight elisp code.

在 2.1 版本加入.

class pygments.lexers.lisp.FennelLexer
短名称:

fennel, fnl

文件名:

*.fnl

MIME类型:

None

A lexer for the Fennel programming language.

Fennel compiles to Lua, so all the Lua builtins are recognized as well as the special forms that are particular to the Fennel compiler.

在 2.3 版本加入.

class pygments.lexers.lisp.HyLexer
短名称:

hylang

文件名:

*.hy

MIME类型:

text/x-hy, application/x-hy

Lexer for Hy source code.

在 2.0 版本加入.

class pygments.lexers.lisp.NewLispLexer
短名称:

newlisp

文件名:

*.lsp, *.nl, *.kif

MIME类型:

text/x-newlisp, application/x-newlisp

For newLISP source code (version 10.3.0).

在 1.5 版本加入.

class pygments.lexers.lisp.RacketLexer
短名称:

racket, rkt

文件名:

*.rkt, *.rktd, *.rktl

MIME类型:

text/x-racket, application/x-racket

Lexer for Racket source code (formerly known as PLT Scheme).

在 1.6 版本加入.

class pygments.lexers.lisp.SchemeLexer
短名称:

scheme, scm

文件名:

*.scm, *.ss

MIME类型:

text/x-scheme, application/x-scheme

A Scheme lexer.

This parser is checked with pastes from the LISP pastebin at http://paste.lisp.org/ to cover as much syntax as possible.

It supports the full Scheme syntax as defined in R5RS.

在 0.6 版本加入.

class pygments.lexers.lisp.ShenLexer
短名称:

shen

文件名:

*.shen

MIME类型:

text/x-shen, application/x-shen

Lexer for Shen source code.

在 2.1 版本加入.

class pygments.lexers.lisp.XtlangLexer
短名称:

extempore

文件名:

*.xtm

MIME类型:

None

An xtlang lexer for the Extempore programming environment.

This is a mixture of Scheme and xtlang, really. Keyword lists are taken from the Extempore Emacs mode (https://github.com/extemporelang/extempore-emacs-mode)

在 2.2 版本加入.

Lexer for Macaulay2

class pygments.lexers.macaulay2.Macaulay2Lexer
短名称:

macaulay2

文件名:

*.m2

MIME类型:

None

Lexer for Macaulay2, a software system for research in algebraic geometry.

Lexers for Makefiles and similar

class pygments.lexers.make.BaseMakefileLexer
短名称:

basemake

文件名:

None

MIME类型:

None

Lexer for simple Makefiles (no preprocessing).

在 0.10 版本加入.

class pygments.lexers.make.CMakeLexer
短名称:

cmake

文件名:

*.cmake, CMakeLists.txt

MIME类型:

text/x-cmake

Lexer for CMake files.

在 1.2 版本加入.

class pygments.lexers.make.MakefileLexer
短名称:

make, makefile, mf, bsdmake

文件名:

*.mak, *.mk, Makefile, makefile, Makefile.*, GNUmakefile

MIME类型:

text/x-makefile

Lexer for BSD and GNU make extensions (lenient enough to handle both in the same file even).

Rewritten in Pygments 0.10.

Lexers for non-HTML markup languages

class pygments.lexers.markup.BBCodeLexer
短名称:

bbcode

文件名:

None

MIME类型:

text/x-bbcode

A lexer that highlights BBCode(-like) syntax.

在 0.6 版本加入.

class pygments.lexers.markup.GroffLexer
短名称:

groff, nroff, man

文件名:

*.[1-9], *.man, *.1p, *.3pm

MIME类型:

application/x-troff, text/troff

Lexer for the (g)roff typesetting language, supporting groff extensions. Mainly useful for highlighting manpage sources.

在 0.6 版本加入.

class pygments.lexers.markup.MarkdownLexer
短名称:

markdown, md

文件名:

*.md, *.markdown

MIME类型:

text/x-markdown

For Markdown markup.

在 2.2 版本加入.

class pygments.lexers.markup.MoinWikiLexer
短名称:

trac-wiki, moin

文件名:

None

MIME类型:

text/x-trac-wiki

For MoinMoin (and Trac) Wiki markup.

在 0.7 版本加入.

class pygments.lexers.markup.MozPreprocCssLexer
短名称:

css+mozpreproc

文件名:

*.css.in

MIME类型:

None

Subclass of the MozPreprocHashLexer that highlights unlexed data with the CssLexer.

在 2.0 版本加入.

class pygments.lexers.markup.MozPreprocHashLexer
短名称:

mozhashpreproc

文件名:

None

MIME类型:

None

Lexer for Mozilla Preprocessor files (with '#' as the marker).

Other data is left untouched.

在 2.0 版本加入.

class pygments.lexers.markup.MozPreprocJavascriptLexer
短名称:

javascript+mozpreproc

文件名:

*.js.in

MIME类型:

None

Subclass of the MozPreprocHashLexer that highlights unlexed data with the JavascriptLexer.

在 2.0 版本加入.

class pygments.lexers.markup.MozPreprocPercentLexer
短名称:

mozpercentpreproc

文件名:

None

MIME类型:

None

Lexer for Mozilla Preprocessor files (with '%' as the marker).

Other data is left untouched.

在 2.0 版本加入.

class pygments.lexers.markup.MozPreprocXulLexer
短名称:

xul+mozpreproc

文件名:

*.xul.in

MIME类型:

None

Subclass of the MozPreprocHashLexer that highlights unlexed data with the XmlLexer.

在 2.0 版本加入.

class pygments.lexers.markup.RstLexer
短名称:

restructuredtext, rst, rest

文件名:

*.rst, *.rest

MIME类型:

text/x-rst, text/prs.fallenstein.rst

For reStructuredText markup.

在 0.7 版本加入.

Additional options accepted:

handlecodeblocks

Highlight the contents of .. sourcecode:: language, .. code:: language and .. code-block:: language directives with a lexer for the given language (default: True).

在 0.8 版本加入.

class pygments.lexers.markup.TexLexer
短名称:

tex, latex

文件名:

*.tex, *.aux, *.toc

MIME类型:

text/x-tex, text/x-latex

Lexer for the TeX and LaTeX typesetting languages.

class pygments.lexers.markup.TiddlyWiki5Lexer
短名称:

tid

文件名:

*.tid

MIME类型:

text/vnd.tiddlywiki

For TiddlyWiki5 markup.

在 2.7 版本加入.

class pygments.lexers.markup.WikitextLexer
短名称:

wikitext, mediawiki

文件名:

None

MIME类型:

text/x-wiki

For MediaWiki Wikitext.

Parsing Wikitext is tricky, and results vary between different MediaWiki installations, so we only highlight common syntaxes (built-in or from popular extensions), and also assume templates produce no unbalanced syntaxes.

在 2.15 版本加入.

Lexer for the computer algebra system Maxima

class pygments.lexers.maxima.MaximaLexer
短名称:

maxima, macsyma

文件名:

*.mac, *.max

MIME类型:

None

A Maxima lexer. Derived from pygments.lexers.MuPADLexer.

在 2.11 版本加入.

Pygments lexer for the Meson build system

class pygments.lexers.meson.MesonLexer
短名称:

meson, meson.build

文件名:

meson.build, mesonoptions.txt

MIME类型:

text/x-meson

Meson language lexer.

The grammar definition use to transcribe the syntax was retrieved from https://mesonbuild.com/Syntax.html#grammar for version 0.58. Some of those definitions are improperly transcribed, so the Meson++ implementation was also checked: https://github.com/dcbaker/meson-plus-plus.

在 2.10 版本加入.

Lexer for Multipurpose Internet Mail Extensions (MIME) data

class pygments.lexers.mime.MIMELexer
短名称:

mime

文件名:

None

MIME类型:

multipart/mixed, multipart/related, multipart/alternative

Lexer for Multipurpose Internet Mail Extensions (MIME) data. This lexer is designed to process nested multipart data.

It assumes that the given data contains both header and body (and is split at an empty line). If no valid header is found, then the entire data will be treated as body.

Additional options accepted:

MIME-max-level

Max recursion level for nested MIME structure. Any negative number would treated as unlimited. (default: -1)

Content-Type

Treat the data as a specific content type. Useful when header is missing, or this lexer would try to parse from header. (default: text/plain)

Multipart-Boundary

Set the default multipart boundary delimiter. This option is only used when Content-Type is multipart and header is missing. This lexer would try to parse from header by default. (default: None)

Content-Transfer-Encoding

Treat the data as a specific encoding. Or this lexer would try to parse from header by default. (default: None)

在 2.5 版本加入.

Lexers for MIPS assembly

class pygments.lexers.mips.MIPSLexer
短名称:

mips

文件名:

*.mips, *.MIPS

MIME类型:

None

A MIPS Assembly Lexer.

Based on the Emacs major mode by hlissner: https://github.com/hlissner/emacs-mips-mode

Lexers for ML family languages

class pygments.lexers.ml.FStarLexer
短名称:

fstar

文件名:

*.fst, *.fsti

MIME类型:

text/x-fstar

For the F* language. .. versionadded:: 2.7

class pygments.lexers.ml.OcamlLexer
短名称:

ocaml

文件名:

*.ml, *.mli, *.mll, *.mly

MIME类型:

text/x-ocaml

For the OCaml language.

在 0.7 版本加入.

class pygments.lexers.ml.OpaLexer
短名称:

opa

文件名:

*.opa

MIME类型:

text/x-opa

Lexer for the Opa language.

在 1.5 版本加入.

class pygments.lexers.ml.ReasonLexer
短名称:

reasonml, reason

文件名:

*.re, *.rei

MIME类型:

text/x-reasonml

For the ReasonML language.

在 2.6 版本加入.

class pygments.lexers.ml.SMLLexer
短名称:

sml

文件名:

*.sml, *.sig, *.fun

MIME类型:

text/x-standardml, application/x-standardml

For the Standard ML language.

在 1.5 版本加入.

Lexers for modeling languages

class pygments.lexers.modeling.BugsLexer
短名称:

bugs, winbugs, openbugs

文件名:

*.bug

MIME类型:

None

Pygments Lexer for OpenBugs and WinBugs models.

在 1.6 版本加入.

class pygments.lexers.modeling.JagsLexer
短名称:

jags

文件名:

*.jag, *.bug

MIME类型:

None

Pygments Lexer for JAGS.

在 1.6 版本加入.

class pygments.lexers.modeling.ModelicaLexer
短名称:

modelica

文件名:

*.mo

MIME类型:

text/x-modelica

For Modelica source code.

在 1.1 版本加入.

class pygments.lexers.modeling.StanLexer
短名称:

stan

文件名:

*.stan

MIME类型:

None

Pygments Lexer for Stan models.

The Stan modeling language is specified in the Stan Modeling Language User's Guide and Reference Manual, v2.17.0, pdf.

在 1.6 版本加入.

Multi-Dialect Lexer for Modula-2

class pygments.lexers.modula2.Modula2Lexer
短名称:

modula2, m2

文件名:

*.def, *.mod

MIME类型:

text/x-modula2

For Modula-2 source code.

The Modula-2 lexer supports several dialects. By default, it operates in fallback mode, recognising the combined literals, punctuation symbols and operators of all supported dialects, and the combined reserved words and builtins of PIM Modula-2, ISO Modula-2 and Modula-2 R10, while not differentiating between library defined identifiers.

To select a specific dialect, a dialect option may be passed or a dialect tag may be embedded into a source file.

Dialect Options:

m2pim

Select PIM Modula-2 dialect.

m2iso

Select ISO Modula-2 dialect.

m2r10

Select Modula-2 R10 dialect.

objm2

Select Objective Modula-2 dialect.

The PIM and ISO dialect options may be qualified with a language extension.

Language Extensions:

+aglet

Select Aglet Modula-2 extensions, available with m2iso.

+gm2

Select GNU Modula-2 extensions, available with m2pim.

+p1

Select p1 Modula-2 extensions, available with m2iso.

+xds

Select XDS Modula-2 extensions, available with m2iso.

Passing a Dialect Option via Unix Commandline Interface

Dialect options may be passed to the lexer using the dialect key. Only one such option should be passed. If multiple dialect options are passed, the first valid option is used, any subsequent options are ignored.

Examples:

$ pygmentize -O full,dialect=m2iso -f html -o /path/to/output /path/to/input

Use ISO dialect to render input to HTML output

$ pygmentize -O full,dialect=m2iso+p1 -f rtf -o /path/to/output /path/to/input

Use ISO dialect with p1 extensions to render input to RTF output

Embedding a Dialect Option within a source file

A dialect option may be embedded in a source file in form of a dialect tag, a specially formatted comment that specifies a dialect option.

Dialect Tag EBNF:

dialectTag :
    OpeningCommentDelim Prefix dialectOption ClosingCommentDelim ;

dialectOption :
    'm2pim' | 'm2iso' | 'm2r10' | 'objm2' |
    'm2iso+aglet' | 'm2pim+gm2' | 'm2iso+p1' | 'm2iso+xds' ;

Prefix : '!' ;

OpeningCommentDelim : '(*' ;

ClosingCommentDelim : '*)' ;

No whitespace is permitted between the tokens of a dialect tag.

In the event that a source file contains multiple dialect tags, the first tag that contains a valid dialect option will be used and any subsequent dialect tags will be ignored. Ideally, a dialect tag should be placed at the beginning of a source file.

An embedded dialect tag overrides a dialect option set via command line.

Examples:

(*!m2r10*) DEFINITION MODULE Foobar; ...

Use Modula2 R10 dialect to render this source file.

(*!m2pim+gm2*) DEFINITION MODULE Bazbam; ...

Use PIM dialect with GNU extensions to render this source file.

Algol Publication Mode:

In Algol publication mode, source text is rendered for publication of algorithms in scientific papers and academic texts, following the format of the Revised Algol-60 Language Report. It is activated by passing one of two corresponding styles as an option:

algol

render reserved words lowercase underline boldface and builtins lowercase boldface italic

algol_nu

render reserved words lowercase boldface (no underlining) and builtins lowercase boldface italic

The lexer automatically performs the required lowercase conversion when this mode is activated.

Example:

$ pygmentize -O full,style=algol -f latex -o /path/to/output /path/to/input

Render input file in Algol publication mode to LaTeX output.

Rendering Mode of First Class ADT Identifiers:

The rendering of standard library first class ADT identifiers is controlled by option flag "treat_stdlib_adts_as_builtins".

When this option is turned on, standard library ADT identifiers are rendered as builtins. When it is turned off, they are rendered as ordinary library identifiers.

treat_stdlib_adts_as_builtins (default: On)

The option is useful for dialects that support ADTs as first class objects and provide ADTs in the standard library that would otherwise be built-in.

At present, only Modula-2 R10 supports library ADTs as first class objects and therefore, no ADT identifiers are defined for any other dialects.

Example:

$ pygmentize -O full,dialect=m2r10,treat_stdlib_adts_as_builtins=Off ...

Render standard library ADTs as ordinary library types.

在 1.3 版本加入.

在 2.1 版本发生变更: Added multi-dialect support.

Lexer for the Monte programming language

class pygments.lexers.monte.MonteLexer
短名称:

monte

文件名:

*.mt

MIME类型:

None

Lexer for the Monte programming language.

在 2.2 版本加入.

Lexers for the mosel language

class pygments.lexers.mosel.MoselLexer
短名称:

mosel

文件名:

*.mos

MIME类型:

None

For the Mosel optimization language.

在 2.6 版本加入.

Lexers for NCAR Command Language

class pygments.lexers.ncl.NCLLexer
短名称:

ncl

文件名:

*.ncl

MIME类型:

text/ncl

Lexer for NCL code.

在 2.2 版本加入.

Lexer for the Nim language (formerly known as Nimrod)

class pygments.lexers.nimrod.NimrodLexer
短名称:

nimrod, nim

文件名:

*.nim, *.nimrod

MIME类型:

text/x-nim

For Nim source code.

在 1.5 版本加入.

Lexer for the Nit language

class pygments.lexers.nit.NitLexer
短名称:

nit

文件名:

*.nit

MIME类型:

None

For nit source.

在 2.0 版本加入.

Lexers for the NixOS Nix language

class pygments.lexers.nix.NixLexer
短名称:

nixos, nix

文件名:

*.nix

MIME类型:

text/x-nix

For the Nix language.

在 2.0 版本加入.

Lexers for Oberon family languages

class pygments.lexers.oberon.ComponentPascalLexer
短名称:

componentpascal, cp

文件名:

*.cp, *.cps

MIME类型:

text/x-component-pascal

For Component Pascal source code.

在 2.1 版本加入.

Lexers for Objective-C family languages

class pygments.lexers.objective.LogosLexer
短名称:

logos

文件名:

*.x, *.xi, *.xm, *.xmi

MIME类型:

text/x-logos

For Logos + Objective-C source code with preprocessor directives.

在 1.6 版本加入.

class pygments.lexers.objective.ObjectiveCLexer
短名称:

objective-c, objectivec, obj-c, objc

文件名:

*.m, *.h

MIME类型:

text/x-objective-c

For Objective-C source code with preprocessor directives.

class pygments.lexers.objective.ObjectiveCppLexer
短名称:

objective-c++, objectivec++, obj-c++, objc++

文件名:

*.mm, *.hh

MIME类型:

text/x-objective-c++

For Objective-C++ source code with preprocessor directives.

class pygments.lexers.objective.SwiftLexer
短名称:

swift

文件名:

*.swift

MIME类型:

text/x-swift

For Swift source.

在 2.0 版本加入.

Lexers for the Ooc language

class pygments.lexers.ooc.OocLexer
短名称:

ooc

文件名:

*.ooc

MIME类型:

text/x-ooc

For Ooc source code

在 1.2 版本加入.

Lexers for the OpenSCAD languages

class pygments.lexers.openscad.OpenScadLexer
短名称:

openscad

文件名:

*.scad

MIME类型:

application/x-openscad

For openSCAD code.

在 2.16 版本加入.

Lexer for ParaSail

class pygments.lexers.parasail.ParaSailLexer
短名称:

parasail

文件名:

*.psi, *.psl

MIME类型:

text/x-parasail

For ParaSail source code.

在 2.1 版本加入.

Lexers for parser generators

class pygments.lexers.parsers.AntlrActionScriptLexer
短名称:

antlr-actionscript, antlr-as

文件名:

*.G, *.g

MIME类型:

None

ANTLR with ActionScript Target

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrCSharpLexer
短名称:

antlr-csharp, antlr-c#

文件名:

*.G, *.g

MIME类型:

None

ANTLR with C# Target

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrCppLexer
短名称:

antlr-cpp

文件名:

*.G, *.g

MIME类型:

None

ANTLR with C++ Target

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrJavaLexer
短名称:

antlr-java

文件名:

*.G, *.g

MIME类型:

None

ANTLR with Java Target

在 1. 版本加入.

class pygments.lexers.parsers.AntlrLexer
短名称:

antlr

文件名:

None

MIME类型:

None

Generic ANTLR Lexer. Should not be called directly, instead use DelegatingLexer for your target language.

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrObjectiveCLexer
短名称:

antlr-objc

文件名:

*.G, *.g

MIME类型:

None

ANTLR with Objective-C Target

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrPerlLexer
短名称:

antlr-perl

文件名:

*.G, *.g

MIME类型:

None

ANTLR with Perl Target

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrPythonLexer
短名称:

antlr-python

文件名:

*.G, *.g

MIME类型:

None

ANTLR with Python Target

在 1.1 版本加入.

class pygments.lexers.parsers.AntlrRubyLexer
短名称:

antlr-ruby, antlr-rb

文件名:

*.G, *.g

MIME类型:

None

ANTLR with Ruby Target

在 1.1 版本加入.

class pygments.lexers.parsers.EbnfLexer
短名称:

ebnf

文件名:

*.ebnf

MIME类型:

text/x-ebnf

Lexer for ISO/IEC 14977 EBNF grammars.

在 2.0 版本加入.

class pygments.lexers.parsers.RagelCLexer
短名称:

ragel-c

文件名:

*.rl

MIME类型:

None

A lexer for Ragel in a C host file.

在 1.1 版本加入.

class pygments.lexers.parsers.RagelCppLexer
短名称:

ragel-cpp

文件名:

*.rl

MIME类型:

None

A lexer for Ragel in a C++ host file.

在 1.1 版本加入.

class pygments.lexers.parsers.RagelDLexer
短名称:

ragel-d

文件名:

*.rl

MIME类型:

None

A lexer for Ragel in a D host file.

在 1.1 版本加入.

class pygments.lexers.parsers.RagelEmbeddedLexer
短名称:

ragel-em

文件名:

*.rl

MIME类型:

None

A lexer for Ragel embedded in a host language file.

This will only highlight Ragel statements. If you want host language highlighting then call the language-specific Ragel lexer.

在 1.1 版本加入.

class pygments.lexers.parsers.RagelJavaLexer
短名称:

ragel-java

文件名:

*.rl

MIME类型:

None

A lexer for Ragel in a Java host file.

在 1.1 版本加入.

class pygments.lexers.parsers.RagelLexer
短名称:

ragel

文件名:

None

MIME类型:

None

A pure Ragel lexer. Use this for fragments of Ragel. For .rl files, use RagelEmbeddedLexer instead (or one of the language-specific subclasses).

在 1.1 版本加入.

class pygments.lexers.parsers.RagelObjectiveCLexer
短名称:

ragel-objc

文件名:

*.rl

MIME类型:

None

A lexer for Ragel in an Objective C host file.

在 1.1 版本加入.

class pygments.lexers.parsers.RagelRubyLexer
短名称:

ragel-ruby, ragel-rb

文件名:

*.rl

MIME类型:

None

A lexer for Ragel in a Ruby host file.

在 1.1 版本加入.

class pygments.lexers.parsers.TreetopLexer
短名称:

treetop

文件名:

*.treetop, *.tt

MIME类型:

None

A lexer for Treetop grammars.

在 1.6 版本加入.

Lexers for Pascal family languages

class pygments.lexers.pascal.DelphiLexer
短名称:

delphi, pas, pascal, objectpascal

文件名:

*.pas, *.dpr

MIME类型:

text/x-pascal

For Delphi (Borland Object Pascal), Turbo Pascal and Free Pascal source code.

Additional options accepted:

turbopascal

Highlight Turbo Pascal specific keywords (default: True).

delphi

Highlight Borland Delphi specific keywords (default: True).

freepascal

Highlight Free Pascal specific keywords (default: True).

units

A list of units that should be considered builtin, supported are System, SysUtils, Classes and Math. Default is to consider all of them builtin.

class pygments.lexers.pascal.PortugolLexer
短名称:

portugol

文件名:

*.alg, *.portugol

MIME类型:

None

For Portugol, a Pascal dialect with keywords in Portuguese.

Lexers for the Pawn languages

class pygments.lexers.pawn.PawnLexer
短名称:

pawn

文件名:

*.p, *.pwn, *.inc

MIME类型:

text/x-pawn

For Pawn source code.

在 2.0 版本加入.

class pygments.lexers.pawn.SourcePawnLexer
短名称:

sp

文件名:

*.sp

MIME类型:

text/x-sourcepawn

For SourcePawn source code with preprocessor directives.

在 1.6 版本加入.

Lexers for Phix

class pygments.lexers.phix.PhixLexer
短名称:

phix

文件名:

*.exw

MIME类型:

text/x-phix

Pygments Lexer for Phix files (.exw). See http://phix.x10.mx

在 2.14.0 版本加入.

Lexers for Pointless

class pygments.lexers.pointless.PointlessLexer
短名称:

pointless

文件名:

*.ptls

MIME类型:

None

For Pointless source code.

在 2.7 版本加入.

Lexer for Praat

class pygments.lexers.praat.PraatLexer
短名称:

praat

文件名:

*.praat, *.proc, *.psc

MIME类型:

None

For Praat scripts.

在 2.1 版本加入.

Lexer for Procfile file format

class pygments.lexers.procfile.ProcfileLexer
短名称:

procfile

文件名:

Procfile

MIME类型:

None

Lexer for Procfile file format.

The format is used to run processes on Heroku or is used by Foreman or Honcho tools.

在 2.10 版本加入.

Lexers for Prolog and Prolog-like languages

class pygments.lexers.prolog.LogtalkLexer
短名称:

logtalk

文件名:

*.lgt, *.logtalk

MIME类型:

text/x-logtalk

For Logtalk source code.

在 0.10 版本加入.

class pygments.lexers.prolog.PrologLexer
短名称:

prolog

文件名:

*.ecl, *.prolog, *.pro, *.pl

MIME类型:

text/x-prolog

Lexer for Prolog files.

Lexer for Prometheus Query Language

class pygments.lexers.promql.PromQLLexer
短名称:

promql

文件名:

*.promql

MIME类型:

None

For PromQL queries.

For details about the grammar see: https://github.com/prometheus/prometheus/tree/master/promql/parser

Lexer for other PTX language

class pygments.lexers.ptx.PtxLexer
短名称:

ptx

文件名:

*.ptx

MIME类型:

text/x-ptx

For NVIDIA PTX source.

在 2.16 版本加入.

Lexer for the Q programming language

class pygments.lexers.q.KLexer
短名称:

k

文件名:

*.k

MIME类型:

None

For K source code.

在 2.12 版本加入.

class pygments.lexers.q.QLexer
短名称:

q

文件名:

*.q

MIME类型:

None

For Q source code.

在 2.12 版本加入.

Lexer for the qlik scripting language

class pygments.lexers.qlik.QlikLexer
短名称:

qlik, qlikview, qliksense, qlikscript

文件名:

*.qvs, *.qvw

MIME类型:

None

Lexer for qlik code, including .qvs files

在 2.12 版本加入.

Lexer for QVT Operational language

class pygments.lexers.qvt.QVToLexer
短名称:

qvto, qvt

文件名:

*.qvto

MIME类型:

None

For the QVT Operational Mapping language.

Reference for implementing this: «Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification», Version 1.1 - January 2011 (http://www.omg.org/spec/QVT/1.1/), see §8.4, «Concrete Syntax» in particular.

Notable tokens assignments:

  • Name.Class is assigned to the identifier following any of the following keywords: metamodel, class, exception, primitive, enum, transformation or library

  • Name.Function is assigned to the names of mappings and queries

  • Name.Builtin.Pseudo is assigned to the pre-defined variables 'this', 'self' and 'result'.

Lexers for the R/S languages

class pygments.lexers.r.RConsoleLexer
短名称:

rconsole, rout

文件名:

*.Rout

MIME类型:

None

For R console transcripts or R CMD BATCH output files.

class pygments.lexers.r.RdLexer
短名称:

rd

文件名:

*.Rd

MIME类型:

text/x-r-doc

Pygments Lexer for R documentation (Rd) files

This is a very minimal implementation, highlighting little more than the macros. A description of Rd syntax is found in Writing R Extensions and Parsing Rd files.

在 1.6 版本加入.

class pygments.lexers.r.SLexer
短名称:

splus, s, r

文件名:

*.S, *.R, .Rhistory, .Rprofile, .Renviron

MIME类型:

text/S-plus, text/S, text/x-r-source, text/x-r, text/x-R, text/x-r-history, text/x-r-profile

For S, S-plus, and R source code.

在 0.10 版本加入.

Lexers for semantic web and RDF query languages and markup

class pygments.lexers.rdf.ShExCLexer
短名称:

shexc, shex

文件名:

*.shex

MIME类型:

text/shex

Lexer for ShExC shape expressions language syntax.

class pygments.lexers.rdf.SparqlLexer
短名称:

sparql

文件名:

*.rq, *.sparql

MIME类型:

application/sparql-query

Lexer for SPARQL query language.

在 2.0 版本加入.

class pygments.lexers.rdf.TurtleLexer
短名称:

turtle

文件名:

*.ttl

MIME类型:

text/turtle, application/x-turtle

Lexer for Turtle data language.

在 2.1 版本加入.

Lexer for resource definition files

class pygments.lexers.resource.ResourceLexer
短名称:

resourcebundle, resource

文件名:

None

MIME类型:

None

Lexer for ICU Resource bundles.

在 2.0 版本加入.

Lexer for the Ride programming language

class pygments.lexers.ride.RideLexer
短名称:

ride

文件名:

*.ride

MIME类型:

text/x-ride

For Ride source code.

在 2.6 版本加入.

Lexers for RITA language

class pygments.lexers.rita.RitaLexer
短名称:

rita

文件名:

*.rita

MIME类型:

text/rita

Lexer for RITA.

在 2.11 版本加入.

Lexer for Relax-NG Compact syntax

class pygments.lexers.rnc.RNCCompactLexer
短名称:

rng-compact, rnc

文件名:

*.rnc

MIME类型:

None

For RelaxNG-compact syntax.

在 2.2 版本加入.

Lexers for Roboconf DSL

class pygments.lexers.roboconf.RoboconfGraphLexer
短名称:

roboconf-graph

文件名:

*.graph

MIME类型:

None

Lexer for Roboconf graph files.

在 2.1 版本加入.

class pygments.lexers.roboconf.RoboconfInstancesLexer
短名称:

roboconf-instances

文件名:

*.instances

MIME类型:

None

Lexer for Roboconf instances files.

在 2.1 版本加入.

Lexer for Robot Framework

class pygments.lexers.robotframework.RobotFrameworkLexer
短名称:

robotframework

文件名:

*.robot, *.resource

MIME类型:

text/x-robotframework

For Robot Framework test data.

Supports both space and pipe separated plain text formats.

在 1.6 版本加入.

Lexers for the Rust language

class pygments.lexers.rust.RustLexer
短名称:

rust, rs

文件名:

*.rs, *.rs.in

MIME类型:

text/rust, text/x-rust

Lexer for the Rust programming language (version 1.47).

在 1.6 版本加入.

Lexer for SAS

class pygments.lexers.sas.SASLexer
短名称:

sas

文件名:

*.SAS, *.sas

MIME类型:

text/x-sas, text/sas, application/x-sas

For SAS files.

在 2.2 版本加入.

Lexer for Savi

class pygments.lexers.savi.SaviLexer
短名称:

savi

文件名:

*.savi

MIME类型:

None

For Savi source code.

Lexer for scdoc, a simple man page generator

class pygments.lexers.scdoc.ScdocLexer
短名称:

scdoc, scd

文件名:

*.scd, *.scdoc

MIME类型:

None

scdoc is a simple man page generator for POSIX systems written in C99.

在 2.5 版本加入.

Lexer for scripting and embedded languages

class pygments.lexers.scripting.AppleScriptLexer
短名称:

applescript

文件名:

*.applescript

MIME类型:

None

For AppleScript source code, including AppleScript Studio. Contributed by Andreas Amann <aamann@mac.com>.

在 1.0 版本加入.

class pygments.lexers.scripting.ChaiscriptLexer
短名称:

chaiscript, chai

文件名:

*.chai

MIME类型:

text/x-chaiscript, application/x-chaiscript

For ChaiScript source code.

在 2.0 版本加入.

class pygments.lexers.scripting.EasytrieveLexer
短名称:

easytrieve

文件名:

*.ezt, *.mac

MIME类型:

text/x-easytrieve

Easytrieve Plus is a programming language for extracting, filtering and converting sequential data. Furthermore it can layout data for reports. It is mainly used on mainframe platforms and can access several of the mainframe's native file formats. It is somewhat comparable to awk.

在 2.1 版本加入.

class pygments.lexers.scripting.HybrisLexer
短名称:

hybris, hy

文件名:

*.hy, *.hyb

MIME类型:

text/x-hybris, application/x-hybris

For Hybris source code.

在 1.4 版本加入.

class pygments.lexers.scripting.JclLexer
短名称:

jcl

文件名:

*.jcl

MIME类型:

text/x-jcl

Job Control Language (JCL) is a scripting language used on mainframe platforms to instruct the system on how to run a batch job or start a subsystem. It is somewhat comparable to MS DOS batch and Unix shell scripts.

在 2.1 版本加入.

class pygments.lexers.scripting.LSLLexer
短名称:

lsl

文件名:

*.lsl

MIME类型:

text/x-lsl

For Second Life's Linden Scripting Language source code.

在 2.0 版本加入.

class pygments.lexers.scripting.LuaLexer
短名称:

lua

文件名:

*.lua, *.wlua

MIME类型:

text/x-lua, application/x-lua

For Lua source code.

Additional options accepted:

func_name_highlighting

If given and True, highlight builtin function names (default: True).

disabled_modules

If given, must be a list of module names whose function names should not be highlighted. By default all modules are highlighted.

To get a list of allowed modules have a look into the _lua_builtins module:

>>> from pygments.lexers._lua_builtins import MODULES
>>> MODULES.keys()
['string', 'coroutine', 'modules', 'io', 'basic', ...]
class pygments.lexers.scripting.MOOCodeLexer
短名称:

moocode, moo

文件名:

*.moo

MIME类型:

text/x-moocode

For MOOCode (the MOO scripting language).

在 0.9 版本加入.

class pygments.lexers.scripting.MiniScriptLexer
短名称:

miniscript, ms

文件名:

*.ms

MIME类型:

text/x-minicript, application/x-miniscript

For MiniScript source code.

在 2.6 版本加入.

class pygments.lexers.scripting.MoonScriptLexer
短名称:

moonscript, moon

文件名:

*.moon

MIME类型:

text/x-moonscript, application/x-moonscript

For MoonScript source code.

在 1.5 版本加入.

class pygments.lexers.scripting.RexxLexer
短名称:

rexx, arexx

文件名:

*.rexx, *.rex, *.rx, *.arexx

MIME类型:

text/x-rexx

Rexx is a scripting language available for a wide range of different platforms with its roots found on mainframe systems. It is popular for I/O- and data based tasks and can act as glue language to bind different applications together.

在 2.0 版本加入.

Lexer for Smart Game Format (sgf) file format

class pygments.lexers.sgf.SmartGameFormatLexer
短名称:

sgf

文件名:

*.sgf

MIME类型:

None

Lexer for Smart Game Format (sgf) file format.

The format is used to store game records of board games for two players (mainly Go game).

在 2.4 版本加入.

Lexers for various shells

class pygments.lexers.shell.BashLexer
短名称:

bash, sh, ksh, zsh, shell

文件名:

*.sh, *.ksh, *.bash, *.ebuild, *.eclass, *.exheres-0, *.exlib, *.zsh, .bashrc, bashrc, .bash\*, bash\*, zshrc, .zshrc, .kshrc, kshrc, PKGBUILD

MIME类型:

application/x-sh, application/x-shellscript, text/x-shellscript

Lexer for (ba|k|z|)sh shell scripts.

在 0.6 版本加入.

class pygments.lexers.shell.BashSessionLexer
短名称:

console, shell-session

文件名:

*.sh-session, *.shell-session

MIME类型:

application/x-shell-session, application/x-sh-session

Lexer for Bash shell sessions, i.e. command lines, including a prompt, interspersed with output.

在 1.1 版本加入.

class pygments.lexers.shell.BatchLexer
短名称:

batch, bat, dosbatch, winbatch

文件名:

*.bat, *.cmd

MIME类型:

application/x-dos-batch

Lexer for the DOS/Windows Batch file format.

在 0.7 版本加入.

class pygments.lexers.shell.ExeclineLexer
短名称:

execline

文件名:

*.exec

MIME类型:

None

Lexer for Laurent Bercot's execline language (https://skarnet.org/software/execline).

在 2.7 版本加入.

class pygments.lexers.shell.FishShellLexer
短名称:

fish, fishshell

文件名:

*.fish, *.load

MIME类型:

application/x-fish

Lexer for Fish shell scripts.

在 2.1 版本加入.

class pygments.lexers.shell.MSDOSSessionLexer
短名称:

doscon

文件名:

None

MIME类型:

None

Lexer for MS DOS shell sessions, i.e. command lines, including a prompt, interspersed with output.

在 2.1 版本加入.

class pygments.lexers.shell.PowerShellLexer
短名称:

powershell, pwsh, posh, ps1, psm1

文件名:

*.ps1, *.psm1

MIME类型:

text/x-powershell

For Windows PowerShell code.

在 1.5 版本加入.

class pygments.lexers.shell.PowerShellSessionLexer
短名称:

pwsh-session, ps1con

文件名:

None

MIME类型:

None

Lexer for PowerShell sessions, i.e. command lines, including a prompt, interspersed with output.

在 2.1 版本加入.

class pygments.lexers.shell.SlurmBashLexer
短名称:

slurm, sbatch

文件名:

*.sl

MIME类型:

None

Lexer for (ba|k|z|)sh Slurm scripts.

在 2.4 版本加入.

class pygments.lexers.shell.TcshLexer
短名称:

tcsh, csh

文件名:

*.tcsh, *.csh

MIME类型:

application/x-csh

Lexer for tcsh scripts.

在 0.10 版本加入.

class pygments.lexers.shell.TcshSessionLexer
短名称:

tcshcon

文件名:

None

MIME类型:

None

Lexer for Tcsh sessions, i.e. command lines, including a prompt, interspersed with output.

在 2.1 版本加入.

Lexer for Sieve file format

class pygments.lexers.sieve.SieveLexer
短名称:

sieve

文件名:

*.siv, *.sieve

MIME类型:

None

Lexer for sieve format.

在 2.6 版本加入.

Lexer for the Slash programming

class pygments.lexers.slash.SlashLexer
短名称:

slash

文件名:

*.sla

MIME类型:

None

Lexer for the Slash programming language.

在 2.4 版本加入.

Lexers for the Smithy IDL

class pygments.lexers.smithy.SmithyLexer
短名称:

smithy

文件名:

*.smithy

MIME类型:

None

For Smithy IDL

在 2.10 版本加入.

Lexers for the SMV languages

class pygments.lexers.smv.NuSMVLexer
短名称:

nusmv

文件名:

*.smv

MIME类型:

None

Lexer for the NuSMV language.

在 2.2 版本加入.

Lexers for the SNOBOL language

class pygments.lexers.snobol.SnobolLexer
短名称:

snobol

文件名:

*.snobol

MIME类型:

text/x-snobol

Lexer for the SNOBOL4 programming language.

Recognizes the common ASCII equivalents of the original SNOBOL4 operators. Does not require spaces around binary operators.

在 1.5 版本加入.

Lexers for Solidity

class pygments.lexers.solidity.SolidityLexer
短名称:

solidity

文件名:

*.sol

MIME类型:

None

For Solidity source code.

在 2.5 版本加入.

Lexer for Sophia

class pygments.lexers.sophia.SophiaLexer
短名称:

sophia

文件名:

*.aes

MIME类型:

None

A Sophia lexer.

在 2.11 版本加入.

Special lexers

class pygments.lexers.special.OutputLexer
短名称:

output

文件名:

None

MIME类型:

None

Simple lexer that highlights everything as Token.Generic.Output.

在 2.10 版本加入.

class pygments.lexers.special.RawTokenLexer
短名称:

None

文件名:

None

MIME类型:

application/x-pygments-tokens

Recreate a token stream formatted with the RawTokenFormatter.

Additional options accepted:

compress

If set to "gz" or "bz2", decompress the token stream with the given compression algorithm before lexing (default: "").

class pygments.lexers.special.TextLexer
短名称:

text

文件名:

*.txt

MIME类型:

text/plain

"Null" lexer, doesn't highlight anything.

Lexers for the Spice programming language

class pygments.lexers.spice.SpiceLexer
短名称:

spice, spicelang

文件名:

*.spice

MIME类型:

text/x-spice

For Spice source.

在 2.11 版本加入.

Lexers for .SRCINFO files used by Arch Linux Packages

class pygments.lexers.srcinfo.SrcinfoLexer
短名称:

srcinfo

文件名:

.SRCINFO

MIME类型:

None

Lexer for .SRCINFO files used by Arch Linux Packages.

在 2.11 版本加入.

Lexer for Stata

class pygments.lexers.stata.StataLexer
短名称:

stata, do

文件名:

*.do, *.ado

MIME类型:

text/x-stata, text/stata, application/x-stata

For Stata do files.

在 2.2 版本加入.

Lexer for SuperCollider

class pygments.lexers.supercollider.SuperColliderLexer
短名称:

supercollider, sc

文件名:

*.sc, *.scd

MIME类型:

application/supercollider, text/supercollider

For SuperCollider source code.

在 2.1 版本加入.

Lexer for Uxntal

class pygments.lexers.tal.TalLexer
短名称:

tal, uxntal

文件名:

*.tal

MIME类型:

text/x-uxntal

For Uxntal source code.

在 2.12 版本加入.

Lexer for TEAL

class pygments.lexers.teal.TealLexer
短名称:

teal

文件名:

*.teal

MIME类型:

None

For the Transaction Execution Approval Language (TEAL)

For more information about the grammar, see: https://github.com/algorand/go-algorand/blob/master/data/transactions/logic/assembler.go

在 2.9 版本加入.

Lexers for various template engines' markup

class pygments.lexers.templates.Angular2HtmlLexer
短名称:

html+ng2

文件名:

*.ng2

MIME类型:

None

Subclass of the Angular2Lexer that highlights unlexed data with the HtmlLexer.

在 2.0 版本加入.

class pygments.lexers.templates.Angular2Lexer
短名称:

ng2

文件名:

None

MIME类型:

None

Generic angular2 template lexer.

Highlights only the Angular template tags (stuff between {{ and }} and special attributes: '(event)=', '[property]=', '[(twoWayBinding)]='). Everything else is left for a delegating lexer.

在 2.1 版本加入.

class pygments.lexers.templates.CheetahHtmlLexer
短名称:

html+cheetah, html+spitfire, htmlcheetah

文件名:

None

MIME类型:

text/html+cheetah, text/html+spitfire

Subclass of the CheetahLexer that highlights unlexed data with the HtmlLexer.

class pygments.lexers.templates.CheetahJavascriptLexer
短名称:

javascript+cheetah, js+cheetah, javascript+spitfire, js+spitfire

文件名:

None

MIME类型:

application/x-javascript+cheetah, text/x-javascript+cheetah, text/javascript+cheetah, application/x-javascript+spitfire, text/x-javascript+spitfire, text/javascript+spitfire

Subclass of the CheetahLexer that highlights unlexed data with the JavascriptLexer.

class pygments.lexers.templates.CheetahLexer
短名称:

cheetah, spitfire

文件名:

*.tmpl, *.spt

MIME类型:

application/x-cheetah, application/x-spitfire

Generic cheetah templates lexer. Code that isn't Cheetah markup is yielded as Token.Other. This also works for spitfire templates which use the same syntax.

class pygments.lexers.templates.CheetahXmlLexer
短名称:

xml+cheetah, xml+spitfire

文件名:

None

MIME类型:

application/xml+cheetah, application/xml+spitfire

Subclass of the CheetahLexer that highlights unlexed data with the XmlLexer.

class pygments.lexers.templates.ColdfusionCFCLexer
短名称:

cfc

文件名:

*.cfc

MIME类型:

None

Coldfusion markup/script components

在 2.0 版本加入.

class pygments.lexers.templates.ColdfusionHtmlLexer
短名称:

cfm

文件名:

*.cfm, *.cfml

MIME类型:

application/x-coldfusion

Coldfusion markup in html

class pygments.lexers.templates.ColdfusionLexer
短名称:

cfs

文件名:

None

MIME类型:

None

Coldfusion statements

class pygments.lexers.templates.CssDjangoLexer
短名称:

css+django, css+jinja

文件名:

*.css.j2, *.css.jinja2

MIME类型:

text/css+django, text/css+jinja

Subclass of the DjangoLexer that highlights unlexed data with the CssLexer.

class pygments.lexers.templates.CssErbLexer
短名称:

css+ruby, css+erb

文件名:

None

MIME类型:

text/css+ruby

Subclass of ErbLexer which highlights unlexed data with the CssLexer.

class pygments.lexers.templates.CssGenshiLexer
短名称:

css+genshitext, css+genshi

文件名:

None

MIME类型:

text/css+genshi

A lexer that highlights CSS definitions in genshi text templates.

class pygments.lexers.templates.CssPhpLexer
短名称:

css+php

文件名:

None

MIME类型:

text/css+php

Subclass of PhpLexer which highlights unmatched data with the CssLexer.

class pygments.lexers.templates.CssSmartyLexer
短名称:

css+smarty

文件名:

None

MIME类型:

text/css+smarty

Subclass of the SmartyLexer that highlights unlexed data with the CssLexer.

class pygments.lexers.templates.DjangoLexer
短名称:

django, jinja

文件名:

None

MIME类型:

application/x-django-templating, application/x-jinja

Generic django and jinja template lexer.

It just highlights django/jinja code between the preprocessor directives, other data is left untouched by the lexer.

class pygments.lexers.templates.ErbLexer
短名称:

erb

文件名:

None

MIME类型:

application/x-ruby-templating

Generic ERB (Ruby Templating) lexer.

Just highlights ruby code between the preprocessor directives, other data is left untouched by the lexer.

All options are also forwarded to the RubyLexer.

class pygments.lexers.templates.EvoqueHtmlLexer
短名称:

html+evoque

文件名:

*.html

MIME类型:

text/html+evoque

Subclass of the EvoqueLexer that highlights unlexed data with the HtmlLexer.

在 1.1 版本加入.

class pygments.lexers.templates.EvoqueLexer
短名称:

evoque

文件名:

*.evoque

MIME类型:

application/x-evoque

For files using the Evoque templating system.

在 1.1 版本加入.

class pygments.lexers.templates.EvoqueXmlLexer
短名称:

xml+evoque

文件名:

*.xml

MIME类型:

application/xml+evoque

Subclass of the EvoqueLexer that highlights unlexed data with the XmlLexer.

在 1.1 版本加入.

class pygments.lexers.templates.GenshiLexer
短名称:

genshi, kid, xml+genshi, xml+kid

文件名:

*.kid

MIME类型:

application/x-genshi, application/x-kid

A lexer that highlights genshi and kid kid XML templates.

class pygments.lexers.templates.GenshiTextLexer
短名称:

genshitext

文件名:

None

MIME类型:

application/x-genshi-text, text/x-genshi

A lexer that highlights genshi text templates.

class pygments.lexers.templates.HandlebarsHtmlLexer
短名称:

html+handlebars

文件名:

*.handlebars, *.hbs

MIME类型:

text/html+handlebars, text/x-handlebars-template

Subclass of the HandlebarsLexer that highlights unlexed data with the HtmlLexer.

在 2.0 版本加入.

class pygments.lexers.templates.HandlebarsLexer
短名称:

handlebars

文件名:

None

MIME类型:

None

Generic handlebars template lexer.

Highlights only the Handlebars template tags (stuff between {{ and }}). Everything else is left for a delegating lexer.

在 2.0 版本加入.

class pygments.lexers.templates.HtmlDjangoLexer
短名称:

html+django, html+jinja, htmldjango

文件名:

*.html.j2, *.htm.j2, *.xhtml.j2, *.html.jinja2, *.htm.jinja2, *.xhtml.jinja2

MIME类型:

text/html+django, text/html+jinja

Subclass of the DjangoLexer that highlights unlexed data with the HtmlLexer.

Nested Javascript and CSS is highlighted too.

class pygments.lexers.templates.HtmlGenshiLexer
短名称:

html+genshi, html+kid

文件名:

None

MIME类型:

text/html+genshi

A lexer that highlights genshi and kid kid HTML templates.

class pygments.lexers.templates.HtmlPhpLexer
短名称:

html+php

文件名:

*.phtml

MIME类型:

application/x-php, application/x-httpd-php, application/x-httpd-php3, application/x-httpd-php4, application/x-httpd-php5

Subclass of PhpLexer that highlights unhandled data with the HtmlLexer.

Nested Javascript and CSS is highlighted too.

class pygments.lexers.templates.HtmlSmartyLexer
短名称:

html+smarty

文件名:

None

MIME类型:

text/html+smarty

Subclass of the SmartyLexer that highlights unlexed data with the HtmlLexer.

Nested Javascript and CSS is highlighted too.

class pygments.lexers.templates.JavascriptDjangoLexer
短名称:

javascript+django, js+django, javascript+jinja, js+jinja

文件名:

*.js.j2, *.js.jinja2

MIME类型:

application/x-javascript+django, application/x-javascript+jinja, text/x-javascript+django, text/x-javascript+jinja, text/javascript+django, text/javascript+jinja

Subclass of the DjangoLexer that highlights unlexed data with the JavascriptLexer.

class pygments.lexers.templates.JavascriptErbLexer
短名称:

javascript+ruby, js+ruby, javascript+erb, js+erb

文件名:

None

MIME类型:

application/x-javascript+ruby, text/x-javascript+ruby, text/javascript+ruby

Subclass of ErbLexer which highlights unlexed data with the JavascriptLexer.

class pygments.lexers.templates.JavascriptGenshiLexer
短名称:

js+genshitext, js+genshi, javascript+genshitext, javascript+genshi

文件名:

None

MIME类型:

application/x-javascript+genshi, text/x-javascript+genshi, text/javascript+genshi

A lexer that highlights javascript code in genshi text templates.

class pygments.lexers.templates.JavascriptPhpLexer
短名称:

javascript+php, js+php

文件名:

None

MIME类型:

application/x-javascript+php, text/x-javascript+php, text/javascript+php

Subclass of PhpLexer which highlights unmatched data with the JavascriptLexer.

class pygments.lexers.templates.JavascriptSmartyLexer
短名称:

javascript+smarty, js+smarty

文件名:

None

MIME类型:

application/x-javascript+smarty, text/x-javascript+smarty, text/javascript+smarty

Subclass of the SmartyLexer that highlights unlexed data with the JavascriptLexer.

class pygments.lexers.templates.JspLexer
短名称:

jsp

文件名:

*.jsp

MIME类型:

application/x-jsp

Lexer for Java Server Pages.

在 0.7 版本加入.

class pygments.lexers.templates.LassoCssLexer
短名称:

css+lasso

文件名:

None

MIME类型:

text/css+lasso

Subclass of the LassoLexer which highlights unhandled data with the CssLexer.

在 1.6 版本加入.

class pygments.lexers.templates.LassoHtmlLexer
短名称:

html+lasso

文件名:

None

MIME类型:

text/html+lasso, application/x-httpd-lasso, application/x-httpd-lasso[89]

Subclass of the LassoLexer which highlights unhandled data with the HtmlLexer.

Nested JavaScript and CSS is also highlighted.

在 1.6 版本加入.

class pygments.lexers.templates.LassoJavascriptLexer
短名称:

javascript+lasso, js+lasso

文件名:

None

MIME类型:

application/x-javascript+lasso, text/x-javascript+lasso, text/javascript+lasso

Subclass of the LassoLexer which highlights unhandled data with the JavascriptLexer.

在 1.6 版本加入.

class pygments.lexers.templates.LassoXmlLexer
短名称:

xml+lasso

文件名:

None

MIME类型:

application/xml+lasso

Subclass of the LassoLexer which highlights unhandled data with the XmlLexer.

在 1.6 版本加入.

class pygments.lexers.templates.LiquidLexer
短名称:

liquid

文件名:

*.liquid

MIME类型:

None

Lexer for Liquid templates.

在 2.0 版本加入.

class pygments.lexers.templates.MakoCssLexer
短名称:

css+mako

文件名:

None

MIME类型:

text/css+mako

Subclass of the MakoLexer that highlights unlexed data with the CssLexer.

在 0.7 版本加入.

class pygments.lexers.templates.MakoHtmlLexer
短名称:

html+mako

文件名:

None

MIME类型:

text/html+mako

Subclass of the MakoLexer that highlights unlexed data with the HtmlLexer.

在 0.7 版本加入.

class pygments.lexers.templates.MakoJavascriptLexer
短名称:

javascript+mako, js+mako

文件名:

None

MIME类型:

application/x-javascript+mako, text/x-javascript+mako, text/javascript+mako

Subclass of the MakoLexer that highlights unlexed data with the JavascriptLexer.

在 0.7 版本加入.

class pygments.lexers.templates.MakoLexer
短名称:

mako

文件名:

*.mao

MIME类型:

application/x-mako

Generic mako templates lexer. Code that isn't Mako markup is yielded as Token.Other.

在 0.7 版本加入.

class pygments.lexers.templates.MakoXmlLexer
短名称:

xml+mako

文件名:

None

MIME类型:

application/xml+mako

Subclass of the MakoLexer that highlights unlexed data with the XmlLexer.

在 0.7 版本加入.

class pygments.lexers.templates.MasonLexer
短名称:

mason

文件名:

*.m, *.mhtml, *.mc, *.mi, autohandler, dhandler

MIME类型:

application/x-mason

Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't Mason markup is HTML.

在 1.4 版本加入.

class pygments.lexers.templates.MyghtyCssLexer
短名称:

css+myghty

文件名:

None

MIME类型:

text/css+myghty

Subclass of the MyghtyLexer that highlights unlexed data with the CssLexer.

在 0.6 版本加入.

class pygments.lexers.templates.MyghtyHtmlLexer
短名称:

html+myghty

文件名:

None

MIME类型:

text/html+myghty

Subclass of the MyghtyLexer that highlights unlexed data with the HtmlLexer.

在 0.6 版本加入.

class pygments.lexers.templates.MyghtyJavascriptLexer
短名称:

javascript+myghty, js+myghty

文件名:

None

MIME类型:

application/x-javascript+myghty, text/x-javascript+myghty, text/javascript+mygthy

Subclass of the MyghtyLexer that highlights unlexed data with the JavascriptLexer.

在 0.6 版本加入.

class pygments.lexers.templates.MyghtyLexer
短名称:

myghty

文件名:

*.myt, autodelegate

MIME类型:

application/x-myghty

Generic myghty templates lexer. Code that isn't Myghty markup is yielded as Token.Other.

在 0.6 版本加入.

class pygments.lexers.templates.MyghtyXmlLexer
短名称:

xml+myghty

文件名:

None

MIME类型:

application/xml+myghty

Subclass of the MyghtyLexer that highlights unlexed data with the XmlLexer.

在 0.6 版本加入.

class pygments.lexers.templates.RhtmlLexer
短名称:

rhtml, html+erb, html+ruby

文件名:

*.rhtml

MIME类型:

text/html+ruby

Subclass of the ERB lexer that highlights the unlexed data with the html lexer.

Nested Javascript and CSS is highlighted too.

class pygments.lexers.templates.SmartyLexer
短名称:

smarty

文件名:

*.tpl

MIME类型:

application/x-smarty

Generic Smarty template lexer.

Just highlights smarty code between the preprocessor directives, other data is left untouched by the lexer.

class pygments.lexers.templates.SqlJinjaLexer
短名称:

sql+jinja

文件名:

*.sql, *.sql.j2, *.sql.jinja2

MIME类型:

None

Templated SQL lexer.

在 2.13 版本加入.

class pygments.lexers.templates.SspLexer
短名称:

ssp

文件名:

*.ssp

MIME类型:

application/x-ssp

Lexer for Scalate Server Pages.

在 1.4 版本加入.

class pygments.lexers.templates.TeaTemplateLexer
短名称:

tea

文件名:

*.tea

MIME类型:

text/x-tea

Lexer for Tea Templates.

在 1.5 版本加入.

class pygments.lexers.templates.TwigHtmlLexer
短名称:

html+twig

文件名:

*.twig

MIME类型:

text/html+twig

Subclass of the TwigLexer that highlights unlexed data with the HtmlLexer.

在 2.0 版本加入.

class pygments.lexers.templates.TwigLexer
短名称:

twig

文件名:

None

MIME类型:

application/x-twig

Twig template lexer.

It just highlights Twig code between the preprocessor directives, other data is left untouched by the lexer.

在 2.0 版本加入.

class pygments.lexers.templates.VelocityHtmlLexer
短名称:

html+velocity

文件名:

None

MIME类型:

text/html+velocity

Subclass of the VelocityLexer that highlights unlexed data with the HtmlLexer.

class pygments.lexers.templates.VelocityLexer
短名称:

velocity

文件名:

*.vm, *.fhtml

MIME类型:

None

Generic Velocity template lexer.

Just highlights velocity directives and variable references, other data is left untouched by the lexer.

class pygments.lexers.templates.VelocityXmlLexer
短名称:

xml+velocity

文件名:

None

MIME类型:

application/xml+velocity

Subclass of the VelocityLexer that highlights unlexed data with the XmlLexer.

class pygments.lexers.templates.XmlDjangoLexer
短名称:

xml+django, xml+jinja

文件名:

*.xml.j2, *.xml.jinja2

MIME类型:

application/xml+django, application/xml+jinja

Subclass of the DjangoLexer that highlights unlexed data with the XmlLexer.

class pygments.lexers.templates.XmlErbLexer
短名称:

xml+ruby, xml+erb

文件名:

None

MIME类型:

application/xml+ruby

Subclass of ErbLexer which highlights data outside preprocessor directives with the XmlLexer.

class pygments.lexers.templates.XmlPhpLexer
短名称:

xml+php

文件名:

None

MIME类型:

application/xml+php

Subclass of PhpLexer that highlights unhandled data with the XmlLexer.

class pygments.lexers.templates.XmlSmartyLexer
短名称:

xml+smarty

文件名:

None

MIME类型:

application/xml+smarty

Subclass of the SmartyLexer that highlights unlexed data with the XmlLexer.

class pygments.lexers.templates.YamlJinjaLexer
短名称:

yaml+jinja, salt, sls

文件名:

*.sls, *.yaml.j2, *.yml.j2, *.yaml.jinja2, *.yml.jinja2

MIME类型:

text/x-yaml+jinja, text/x-sls

Subclass of the DjangoLexer that highlights unlexed data with the YamlLexer.

Commonly used in Saltstack salt states.

在 2.0 版本加入.

Lexer for Tera Term macro files

class pygments.lexers.teraterm.TeraTermLexer
短名称:

teratermmacro, teraterm, ttl

文件名:

*.ttl

MIME类型:

text/x-teratermmacro

For Tera Term macro source code.

在 2.4 版本加入.

Lexers for testing languages

class pygments.lexers.testing.GherkinLexer
短名称:

gherkin, cucumber

文件名:

*.feature

MIME类型:

text/x-gherkin

For Gherkin syntax.

在 1.2 版本加入.

class pygments.lexers.testing.TAPLexer
短名称:

tap

文件名:

*.tap

MIME类型:

None

For Test Anything Protocol (TAP) output.

在 2.1 版本加入.

Lexers for various text formats

class pygments.lexers.textfmts.GettextLexer
短名称:

pot, po

文件名:

*.pot, *.po

MIME类型:

application/x-gettext, text/x-gettext, text/gettext

Lexer for Gettext catalog files.

在 0.9 版本加入.

class pygments.lexers.textfmts.HttpLexer
短名称:

http

文件名:

None

MIME类型:

None

Lexer for HTTP sessions.

在 1.5 版本加入.

class pygments.lexers.textfmts.IrcLogsLexer
短名称:

irc

文件名:

*.weechatlog

MIME类型:

text/x-irclog

Lexer for IRC logs in irssi, xchat or weechat style.

class pygments.lexers.textfmts.KernelLogLexer
短名称:

kmsg, dmesg

文件名:

*.kmsg, *.dmesg

MIME类型:

None

For Linux Kernel log ("dmesg") output.

在 2.6 版本加入.

class pygments.lexers.textfmts.NotmuchLexer
短名称:

notmuch

文件名:

None

MIME类型:

None

For Notmuch email text format.

在 2.5 版本加入.

Additional options accepted:

body_lexer

If given, highlight the contents of the message body with the specified lexer, else guess it according to the body content (default: None).

class pygments.lexers.textfmts.TodotxtLexer
短名称:

todotxt

文件名:

todo.txt, *.todotxt

MIME类型:

text/x-todo

Lexer for Todo.txt todo list format.

在 2.0 版本加入.

Lexers for theorem-proving languages

class pygments.lexers.theorem.CoqLexer
短名称:

coq

文件名:

*.v

MIME类型:

text/x-coq

For the Coq theorem prover.

在 1.5 版本加入.

class pygments.lexers.theorem.IsabelleLexer
短名称:

isabelle

文件名:

*.thy

MIME类型:

text/x-isabelle

For the Isabelle proof assistant.

在 2.0 版本加入.

class pygments.lexers.theorem.LeanLexer
短名称:

lean

文件名:

*.lean

MIME类型:

text/x-lean

For the Lean theorem prover.

在 2.0 版本加入.

Lexers for the ThingsDB language

class pygments.lexers.thingsdb.ThingsDBLexer
短名称:

ti, thingsdb

文件名:

*.ti

MIME类型:

None

Lexer for the ThingsDB programming language.

在 2.9 版本加入.

Lexers for TL-b

class pygments.lexers.tlb.TlbLexer
短名称:

tlb

文件名:

*.tlb

MIME类型:

None

For TL-b source code.

Lexers for the TLS presentation language

class pygments.lexers.tls.TlsLexer
短名称:

tls

文件名:

None

MIME类型:

None

The TLS presentation language, described in RFC 8446.

在 2.16 版本加入.

Lexer for Typographic Number Theory

class pygments.lexers.tnt.TNTLexer
短名称:

tnt

文件名:

*.tnt

MIME类型:

None

Lexer for Typographic Number Theory, as described in the book Gödel, Escher, Bach, by Douglas R. Hofstadter

在 2.7 版本加入.

Lexer for RiverBed's TrafficScript (RTS) language

class pygments.lexers.trafficscript.RtsLexer
短名称:

trafficscript, rts

文件名:

*.rts

MIME类型:

None

For Riverbed Stingray Traffic Manager

在 2.1 版本加入.

Lexers for TypoScript

class pygments.lexers.typoscript.TypoScriptCssDataLexer
短名称:

typoscriptcssdata

文件名:

None

MIME类型:

None

Lexer that highlights markers, constants and registers within css blocks.

在 2.2 版本加入.

class pygments.lexers.typoscript.TypoScriptHtmlDataLexer
短名称:

typoscripthtmldata

文件名:

None

MIME类型:

None

Lexer that highlights markers, constants and registers within html tags.

在 2.2 版本加入.

class pygments.lexers.typoscript.TypoScriptLexer
短名称:

typoscript

文件名:

*.typoscript

MIME类型:

text/x-typoscript

Lexer for TypoScript code.

在 2.2 版本加入.

Lexer for the UL4 templating language

class pygments.lexers.ul4.CSSUL4Lexer
短名称:

css+ul4

文件名:

*.cssul4

MIME类型:

None

Lexer for UL4 embedded in CSS.

class pygments.lexers.ul4.HTMLUL4Lexer
短名称:

html+ul4

文件名:

*.htmlul4

MIME类型:

None

Lexer for UL4 embedded in HTML.

class pygments.lexers.ul4.JavascriptUL4Lexer
短名称:

js+ul4

文件名:

*.jsul4

MIME类型:

None

Lexer for UL4 embedded in Javascript.

class pygments.lexers.ul4.PythonUL4Lexer
短名称:

py+ul4

文件名:

*.pyul4

MIME类型:

None

Lexer for UL4 embedded in Python.

class pygments.lexers.ul4.UL4Lexer
短名称:

ul4

文件名:

*.ul4

MIME类型:

None

Generic lexer for UL4.

在 2.12 版本加入.

class pygments.lexers.ul4.XMLUL4Lexer
短名称:

xml+ul4

文件名:

*.xmlul4

MIME类型:

None

Lexer for UL4 embedded in XML.

Lexers for the Icon and Unicon languages, including ucode VM

class pygments.lexers.unicon.IconLexer
短名称:

icon

文件名:

*.icon, *.ICON

MIME类型:

None

Lexer for Icon.

在 1.6 版本加入.

class pygments.lexers.unicon.UcodeLexer
短名称:

ucode

文件名:

*.u, *.u1, *.u2

MIME类型:

None

Lexer for Icon ucode files.

在 2.4 版本加入.

class pygments.lexers.unicon.UniconLexer
短名称:

unicon

文件名:

*.icn

MIME类型:

text/unicon

For Unicon source code.

在 2.4 版本加入.

Lexers for UrbiScript language

class pygments.lexers.urbi.UrbiscriptLexer
短名称:

urbiscript

文件名:

*.u

MIME类型:

application/x-urbiscript

For UrbiScript source code.

在 1.5 版本加入.

The module that parses Pixar's Universal Scene Description file format

class pygments.lexers.usd.UsdLexer
短名称:

usd, usda

文件名:

*.usd, *.usda

MIME类型:

None

A lexer that parses Pixar's Universal Scene Description file format.

在 2.6 版本加入.

Lexers for Varnish configuration

class pygments.lexers.varnish.VCLLexer
短名称:

vcl

文件名:

*.vcl

MIME类型:

text/x-vclsrc

For Varnish Configuration Language (VCL).

在 2.2 版本加入.

class pygments.lexers.varnish.VCLSnippetLexer
短名称:

vclsnippets, vclsnippet

文件名:

None

MIME类型:

text/x-vclsnippet

For Varnish Configuration Language snippets.

在 2.2 版本加入.

Lexer for Intermediate Verification Languages (IVLs)

class pygments.lexers.verification.BoogieLexer
短名称:

boogie

文件名:

*.bpl

MIME类型:

None

For Boogie source code.

在 2.1 版本加入.

class pygments.lexers.verification.SilverLexer
短名称:

silver

文件名:

*.sil, *.vpr

MIME类型:

None

For Silver source code.

在 2.2 版本加入.

Lexers for Verifpal languages

class pygments.lexers.verifpal.VerifpalLexer
短名称:

verifpal

文件名:

*.vp

MIME类型:

text/x-verifpal

For Verifpal code.

在 2.16 版本加入.

Lexers for Visual Prolog & Grammar files

class pygments.lexers.vip.VisualPrologGrammarLexer
短名称:

visualprologgrammar

文件名:

*.vipgrm

MIME类型:

None

None

class pygments.lexers.vip.VisualPrologLexer
短名称:

visualprolog

文件名:

*.pro, *.cl, *.i, *.pack, *.ph

MIME类型:

None

None

Lexers for the WebAssembly text format

class pygments.lexers.webassembly.WatLexer
短名称:

wast, wat

文件名:

*.wat, *.wast

MIME类型:

None

Lexer for the WebAssembly text format.

在 2.9 版本加入.

Lexers for Web IDL, including some extensions

class pygments.lexers.webidl.WebIDLLexer
短名称:

webidl

文件名:

*.webidl

MIME类型:

None

For Web IDL.

在 2.6 版本加入.

Lexers for misc. web stuff

class pygments.lexers.webmisc.CirruLexer
短名称:

cirru

文件名:

*.cirru

MIME类型:

text/x-cirru

  • using () for expressions, but restricted in a same line

  • using "" for strings, with \ for escaping chars

  • using $ as folding operator

  • using , as unfolding operator

  • using indentations for nested blocks

在 2.0 版本加入.

class pygments.lexers.webmisc.DuelLexer
短名称:

duel, jbst, jsonml+bst

文件名:

*.duel, *.jbst

MIME类型:

text/x-duel, text/x-jbst

Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks.

在 1.4 版本加入.

class pygments.lexers.webmisc.QmlLexer
短名称:

qml, qbs

文件名:

*.qml, *.qbs

MIME类型:

application/x-qml, application/x-qt.qbs+qml

For QML files.

在 1.6 版本加入.

class pygments.lexers.webmisc.SlimLexer
短名称:

slim

文件名:

*.slim

MIME类型:

text/x-slim

For Slim markup.

在 2.0 版本加入.

class pygments.lexers.webmisc.XQueryLexer
短名称:

xquery, xqy, xq, xql, xqm

文件名:

*.xqy, *.xquery, *.xq, *.xql, *.xqm

MIME类型:

text/xquery, application/xquery

An XQuery lexer, parsing a stream and outputting the tokens needed to highlight xquery code.

在 1.4 版本加入.

Lexer for the WebGPU Shading Language

class pygments.lexers.wgsl.WgslLexer
短名称:

wgsl

文件名:

*.wgsl

MIME类型:

text/wgsl

Lexer for the WebGPU Shading Language.

在 2.15 版本加入.

Lexers for the Whiley language

class pygments.lexers.whiley.WhileyLexer
短名称:

whiley

文件名:

*.whiley

MIME类型:

text/x-whiley

Lexer for the Whiley programming language.

在 2.2 版本加入.

Lexer for World of Warcraft TOC files

class pygments.lexers.wowtoc.WoWTocLexer
短名称:

wowtoc

文件名:

*.toc

MIME类型:

None

Lexer for World of Warcraft TOC files.

在 2.14 版本加入.

Lexer for Wren

class pygments.lexers.wren.WrenLexer
短名称:

wren

文件名:

*.wren

MIME类型:

None

For Wren source code, version 0.4.0.

在 2.14.0 版本加入.

Lexers for the X10 programming language

class pygments.lexers.x10.X10Lexer
短名称:

x10, xten

文件名:

*.x10

MIME类型:

text/x-x10

For the X10 language.

在 2.2 版本加入.

Lexers for Xorg configs

class pygments.lexers.xorg.XorgLexer
短名称:

xorg.conf

文件名:

xorg.conf

MIME类型:

None

Lexer for xorg.conf files.

Lexer for the YANG 1.1 modeling language. See RFC 7950

class pygments.lexers.yang.YangLexer
短名称:

yang

文件名:

*.yang

MIME类型:

application/yang

Lexer for YANG, based on RFC7950.

在 2.7 版本加入.

Lexers for YARA

class pygments.lexers.yara.YaraLexer
短名称:

yara, yar

文件名:

*.yar

MIME类型:

text/x-yara

For YARA rules

在 2.16 版本加入.

Lexers for Zig

class pygments.lexers.zig.ZigLexer
短名称:

zig

文件名:

*.zig

MIME类型:

text/zig

Lexer for the Zig language.

grammar: https://ziglang.org/documentation/master/#Grammar

遍历所有lexer

在 0.6 版本加入.

要获取所有lexer(包括内置和插件),可以使用 get_all_lexers() 函数来自 pygments.lexers 模块:

>>> from pygments.lexers import get_all_lexers
>>> i = get_all_lexers()
>>> i.next()
('Diff', ('diff',), ('*.diff', '*.patch'), ('text/x-diff', 'text/x-patch'))
>>> i.next()
('Delphi', ('delphi', 'objectpascal', 'pas', 'pascal'), ('*.pas',), ('text/x-pascal',))
>>> i.next()
('XML+Ruby', ('xml+ruby', 'xml+erb'), (), ())

如您所见,返回值是一个迭代器,它在形式中生成元组。 (name, aliases, filetypes, mimetypes) .