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

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>