mirror of
https://github.com/cheat/cheat.git
synced 2024-12-25 14:09:44 +01:00
1790aec85d
Bump `alecthomas/chroma` to `v2`: https://github.com/cheat/cheat/issues/735
132 lines
4.2 KiB
XML
132 lines
4.2 KiB
XML
<lexer>
|
|
<config>
|
|
<name>EmacsLisp</name>
|
|
<alias>emacs</alias>
|
|
<alias>elisp</alias>
|
|
<alias>emacs-lisp</alias>
|
|
<filename>*.el</filename>
|
|
<mime_type>text/x-elisp</mime_type>
|
|
<mime_type>application/x-elisp</mime_type>
|
|
</config>
|
|
<rules>
|
|
<state name="string">
|
|
<rule pattern="[^"\\`]+">
|
|
<token type="LiteralString"/>
|
|
</rule>
|
|
<rule pattern="`((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)\'">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="`">
|
|
<token type="LiteralString"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralString"/>
|
|
</rule>
|
|
<rule pattern="\\\n">
|
|
<token type="LiteralString"/>
|
|
</rule>
|
|
<rule pattern=""">
|
|
<token type="LiteralString"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="root">
|
|
<rule>
|
|
<push state="body"/>
|
|
</rule>
|
|
</state>
|
|
<state name="body">
|
|
<rule pattern="\s+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern=";.*$">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern=""">
|
|
<token type="LiteralString"/>
|
|
<push state="string"/>
|
|
</rule>
|
|
<rule pattern="\?([^\\]|\\.)">
|
|
<token type="LiteralStringChar"/>
|
|
</rule>
|
|
<rule pattern=":((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)">
|
|
<token type="NameBuiltin"/>
|
|
</rule>
|
|
<rule pattern="::((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="'((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="'">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="`">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="[-+]?\d+\.?(?=[ "()\]\'\n,;`])">
|
|
<token type="LiteralNumberInteger"/>
|
|
</rule>
|
|
<rule pattern="[-+]?\d+/\d+(?=[ "()\]\'\n,;`])">
|
|
<token type="LiteralNumber"/>
|
|
</rule>
|
|
<rule pattern="[-+]?(\d*\.\d+([defls][-+]?\d+)?|\d+(\.\d*)?[defls][-+]?\d+)(?=[ "()\]\'\n,;`])">
|
|
<token type="LiteralNumberFloat"/>
|
|
</rule>
|
|
<rule pattern="\[|\]">
|
|
<token type="Punctuation"/>
|
|
</rule>
|
|
<rule pattern="#:((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="#\^\^?">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="#\'">
|
|
<token type="NameFunction"/>
|
|
</rule>
|
|
<rule pattern="#[bB][+-]?[01]+(/[01]+)?">
|
|
<token type="LiteralNumberBin"/>
|
|
</rule>
|
|
<rule pattern="#[oO][+-]?[0-7]+(/[0-7]+)?">
|
|
<token type="LiteralNumberOct"/>
|
|
</rule>
|
|
<rule pattern="#[xX][+-]?[0-9a-fA-F]+(/[0-9a-fA-F]+)?">
|
|
<token type="LiteralNumberHex"/>
|
|
</rule>
|
|
<rule pattern="#\d+r[+-]?[0-9a-zA-Z]+(/[0-9a-zA-Z]+)?">
|
|
<token type="LiteralNumber"/>
|
|
</rule>
|
|
<rule pattern="#\d+=">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="#\d+#">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="(,@|,|\.|:)">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="(t|nil)(?=[ "()\]\'\n,;`])">
|
|
<token type="NameConstant"/>
|
|
</rule>
|
|
<rule pattern="\*((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)\*">
|
|
<token type="NameVariableGlobal"/>
|
|
</rule>
|
|
<rule pattern="((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)">
|
|
<token type="NameVariable"/>
|
|
</rule>
|
|
<rule pattern="#\(">
|
|
<token type="Operator"/>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="\(">
|
|
<token type="Punctuation"/>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="\)">
|
|
<token type="Punctuation"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer> |