Files
cheat/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/json.xml
dependabot[bot] b40cc1e04e chore(deps): bump github.com/alecthomas/chroma/v2 from 2.23.1 to 2.24.1
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.23.1 to 2.24.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.23.1...v2.24.1)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.24.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-30 22:11:51 +00:00

115 lines
2.8 KiB
XML

<lexer>
<config>
<name>JSON</name>
<alias>json</alias>
<filename>*.json</filename>
<filename>*.jsonc</filename>
<filename>*.json5</filename>
<filename>*.avsc</filename>
<filename>.luaurc</filename>
<mime_type>application/json</mime_type>
<dot_all>true</dot_all>
<not_multiline>true</not_multiline>
</config>
<rules>
<state name="root">
<rule>
<include state="value"/>
</rule>
</state>
<state name="whitespace">
<rule pattern="\s+">
<token type="Text"/>
</rule>
</state>
<state name="comment">
<rule pattern="//.*?\n">
<token type="CommentSingle"/>
</rule>
</state>
<state name="simplevalue">
<rule pattern="(true|false|null)\b">
<token type="KeywordConstant"/>
</rule>
<rule pattern="-?(0|[1-9]\d*)(\.\d+[eE](\+|-)?\d+|[eE](\+|-)?\d+|\.\d+)">
<token type="LiteralNumberFloat"/>
</rule>
<rule pattern="-?(0|[1-9]\d*)">
<token type="LiteralNumberInteger"/>
</rule>
<rule pattern="&#34;(\\\\|\\&#34;|[^&#34;])*&#34;">
<token type="LiteralStringDouble"/>
</rule>
</state>
<state name="objectattribute">
<rule>
<include state="value"/>
</rule>
<rule pattern=":">
<token type="Punctuation"/>
</rule>
<rule pattern=",">
<token type="Punctuation"/>
<pop depth="1"/>
</rule>
<rule pattern="\}">
<token type="Punctuation"/>
<pop depth="2"/>
</rule>
</state>
<state name="objectvalue">
<rule>
<include state="whitespace"/>
</rule>
<rule>
<include state="comment"/>
</rule>
<rule pattern="&#34;(\\\\|\\&#34;|[^&#34;])*&#34;">
<token type="NameTag"/>
<push state="objectattribute"/>
</rule>
<rule pattern="\}">
<token type="Punctuation"/>
<pop depth="1"/>
</rule>
</state>
<state name="arrayvalue">
<rule>
<include state="whitespace"/>
</rule>
<rule>
<include state="value"/>
</rule>
<rule>
<include state="comment"/>
</rule>
<rule pattern=",">
<token type="Punctuation"/>
</rule>
<rule pattern="\]">
<token type="Punctuation"/>
<pop depth="1"/>
</rule>
</state>
<state name="value">
<rule>
<include state="whitespace"/>
</rule>
<rule>
<include state="simplevalue"/>
</rule>
<rule>
<include state="comment"/>
</rule>
<rule pattern="\{">
<token type="Punctuation"/>
<push state="objectvalue"/>
</rule>
<rule pattern="\[">
<token type="Punctuation"/>
<push state="arrayvalue"/>
</rule>
</state>
</rules>
</lexer>