cheat/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/brainfuck.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

51 lines
No EOL
1.1 KiB
XML

<lexer>
<config>
<name>Brainfuck</name>
<alias>brainfuck</alias>
<alias>bf</alias>
<filename>*.bf</filename>
<filename>*.b</filename>
<mime_type>application/x-brainfuck</mime_type>
</config>
<rules>
<state name="common">
<rule pattern="[.,]+">
<token type="NameTag"/>
</rule>
<rule pattern="[+-]+">
<token type="NameBuiltin"/>
</rule>
<rule pattern="[&lt;&gt;]+">
<token type="NameVariable"/>
</rule>
<rule pattern="[^.,+\-&lt;&gt;\[\]]+">
<token type="Comment"/>
</rule>
</state>
<state name="root">
<rule pattern="\[">
<token type="Keyword"/>
<push state="loop"/>
</rule>
<rule pattern="\]">
<token type="Error"/>
</rule>
<rule>
<include state="common"/>
</rule>
</state>
<state name="loop">
<rule pattern="\[">
<token type="Keyword"/>
<push/>
</rule>
<rule pattern="\]">
<token type="Keyword"/>
<pop depth="1"/>
</rule>
<rule>
<include state="common"/>
</rule>
</state>
</rules>
</lexer>