Files
cheat/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/txtpb.xml
Christopher Allen Lane 2a19755804 chore: modernize CI and update Go toolchain
- Bump Go from 1.19 to 1.26 and update all dependencies
- Rewrite CI workflow with matrix strategy (Linux, macOS, Windows)
- Update GitHub Actions to current versions (checkout@v4, setup-go@v5)
- Update CodeQL actions from v1 to v3
- Fix cross-platform bug in mock/path.go (path.Join -> filepath.Join)
- Clean up dependabot config (weekly schedule, remove stale ignore)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:58:51 -05:00

163 lines
4.7 KiB
XML

<lexer>
<config>
<name>Protocol Buffer Text Format</name>
<alias>txtpb</alias>
<filename>*.txtpb</filename>
<filename>*.textproto</filename>
<filename>*.textpb</filename>
<filename>*.pbtxt</filename>
<mime_type>application/x-protobuf-text</mime_type>
<case_insensitive>false</case_insensitive>
<dot_all>false</dot_all>
<ensure_nl>true</ensure_nl>
</config>
<rules>
<state name="double-quote">
<rule pattern="\\[abfnrtv\\\?&#39;&#34;]">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\[0-7]{1,3}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\x[0-9a-fA-F]{1,2}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\u[0-9a-fA-F]{4}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\U000[0-9a-fA-F]{5}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\U0010[0-9a-fA-F]{4}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="[^&#34;\\]+">
<token type="LiteralStringDouble"/>
</rule>
<rule pattern="&#34;">
<token type="LiteralStringDouble"/>
<pop depth="1"/>
</rule>
</state>
<state name="single-quote">
<rule pattern="\\[abfnrtv\\\?&#39;&#34;]">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\[0-7]{1,3}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\x[0-9a-fA-F]{1,2}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\u[0-9a-fA-F]{4}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\U000[0-9a-fA-F]{5}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="\\U0010[0-9a-fA-F]{4}">
<token type="LiteralStringEscape"/>
</rule>
<rule pattern="[^&#39;\\]+">
<token type="LiteralStringSingle"/>
</rule>
<rule pattern="&#39;">
<token type="LiteralStringSingle"/>
<pop depth="1"/>
</rule>
</state>
<state name="root">
<!-- Comments -->
<rule pattern="#.*\n">
<token type="CommentSingle"/>
</rule>
<!-- Whitespace -->
<rule pattern="[ \n\t\v\f\r]+">
<token type="Text"/>
</rule>
<!-- Operators -->
<rule pattern="-">
<token type="Operator" />
</rule>
<!-- Special float literals -->
<rule pattern="(?i)(?:inf|infinity)\b">
<token type="LiteralNumberFloat"/>
</rule>
<rule pattern="(?i)nan\b">
<token type="LiteralNumberFloat"/>
</rule>
<!-- Float literals with suffix (must come before decimal integers) -->
<rule pattern="(?:0|[1-9][0-9]*)[fF]">
<token type="LiteralNumberFloat"/>
</rule>
<!-- Float literals -->
<rule pattern="\.[0-9]+(?:[eE][+-]?[0-9]+)?[fF]?">
<token type="LiteralNumberFloat"/>
</rule>
<rule pattern="(?:0|[1-9][0-9]*)\.[0-9]*(?:[eE][+-]?[0-9]+)?[fF]?">
<token type="LiteralNumberFloat"/>
</rule>
<rule pattern="(?:0|[1-9][0-9]*)[eE][+-]?[0-9]+[fF]?">
<token type="LiteralNumberFloat"/>
</rule>
<!-- Hexadecimal integers -->
<rule pattern="0[xX][0-9a-fA-F]+">
<token type="LiteralNumberHex"/>
</rule>
<!-- Octal integers -->
<rule pattern="0[0-7]+">
<token type="LiteralNumberOct"/>
</rule>
<!-- Decimal integers -->
<rule pattern="(?:0|[1-9][0-9]*)">
<token type="LiteralNumberInteger"/>
</rule>
<!-- Boolean keywords -->
<rule pattern="\b(?:[Tt]rue|[Ff]alse|t|f)\b">
<token type="KeywordConstant"/>
</rule>
<!-- Strings -->
<rule pattern="&#34;">
<token type="LiteralStringDouble"/>
<push state="double-quote"/>
</rule>
<rule pattern="&#39;">
<token type="LiteralStringSingle"/>
<push state="single-quote"/>
</rule>
<!-- Qualified names (with dots) for field paths and type URLs -->
<rule pattern="[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+">
<token type="NameNamespace"/>
</rule>
<!-- Field names and identifiers (including enum values) -->
<rule pattern="[a-zA-Z_][a-zA-Z0-9_]*">
<token type="Name"/>
</rule>
<!-- URL paths in type URLs for Any expansion -->
<rule pattern="/[a-zA-Z_][a-zA-Z0-9_/.]*">
<token type="NameNamespace"/>
</rule>
<!-- Punctuation -->
<rule pattern="[:;,&lt;&gt;\[\]{}]">
<token type="Punctuation"/>
</rule>
</state>
</rules>
</lexer>