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
73 lines
1.7 KiB
XML
73 lines
1.7 KiB
XML
<lexer>
|
|
<config>
|
|
<name>PkgConfig</name>
|
|
<alias>pkgconfig</alias>
|
|
<filename>*.pc</filename>
|
|
</config>
|
|
<rules>
|
|
<state name="curly">
|
|
<rule pattern="\}">
|
|
<token type="LiteralStringInterpol"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="\w+">
|
|
<token type="NameAttribute"/>
|
|
</rule>
|
|
</state>
|
|
<state name="spvalue">
|
|
<rule>
|
|
<include state="interp"/>
|
|
</rule>
|
|
<rule pattern="#.*$">
|
|
<token type="CommentSingle"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="\n">
|
|
<token type="Text"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="[^${}#\n]+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern=".">
|
|
<token type="Text"/>
|
|
</rule>
|
|
</state>
|
|
<state name="root">
|
|
<rule pattern="#.*$">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern="^(\w+)(=)">
|
|
<bygroups>
|
|
<token type="NameAttribute"/>
|
|
<token type="Operator"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="^([\w.]+)(:)">
|
|
<bygroups>
|
|
<token type="NameTag"/>
|
|
<token type="Punctuation"/>
|
|
</bygroups>
|
|
<push state="spvalue"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interp"/>
|
|
</rule>
|
|
<rule pattern="[^${}#=:\n.]+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern=".">
|
|
<token type="Text"/>
|
|
</rule>
|
|
</state>
|
|
<state name="interp">
|
|
<rule pattern="\$\$">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="\$\{">
|
|
<token type="LiteralStringInterpol"/>
|
|
<push state="curly"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer> |