cheat/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/reg.xml
Christopher Allen Lane 1790aec85d chore(deps): bump chroma to v2 #735
Bump `alecthomas/chroma` to `v2`:
https://github.com/cheat/cheat/issues/735
2023-12-13 12:54:32 -05:00

68 lines
1.8 KiB
XML

<lexer>
<config>
<name>reg</name>
<alias>registry</alias>
<filename>*.reg</filename>
<mime_type>text/x-windows-registry</mime_type>
</config>
<rules>
<state name="root">
<rule pattern="Windows Registry Editor.*">
<token type="Text"/>
</rule>
<rule pattern="\s+">
<token type="Text"/>
</rule>
<rule pattern="[;#].*">
<token type="CommentSingle"/>
</rule>
<rule pattern="(\[)(-?)(HKEY_[A-Z_]+)(.*?\])$">
<bygroups>
<token type="Keyword"/>
<token type="Operator"/>
<token type="NameBuiltin"/>
<token type="Keyword"/>
</bygroups>
</rule>
<rule pattern="(&#34;(?:\\&#34;|\\\\|[^&#34;])+&#34;)([ \t]*)(=)([ \t]*)">
<bygroups>
<token type="NameAttribute"/>
<token type="Text"/>
<token type="Operator"/>
<token type="Text"/>
</bygroups>
<push state="value"/>
</rule>
<rule pattern="(.*?)([ \t]*)(=)([ \t]*)">
<bygroups>
<token type="NameAttribute"/>
<token type="Text"/>
<token type="Operator"/>
<token type="Text"/>
</bygroups>
<push state="value"/>
</rule>
</state>
<state name="value">
<rule pattern="-">
<token type="Operator"/>
<pop depth="1"/>
</rule>
<rule pattern="(dword|hex(?:\([0-9a-fA-F]\))?)(:)([0-9a-fA-F,]+)">
<bygroups>
<token type="NameVariable"/>
<token type="Punctuation"/>
<token type="LiteralNumber"/>
</bygroups>
<pop depth="1"/>
</rule>
<rule pattern=".+">
<token type="LiteralString"/>
<pop depth="1"/>
</rule>
<rule>
<pop depth="1"/>
</rule>
</state>
</rules>
</lexer>