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
71 lines
2.0 KiB
XML
71 lines
2.0 KiB
XML
<lexer>
|
|
<config>
|
|
<name>Io</name>
|
|
<alias>io</alias>
|
|
<filename>*.io</filename>
|
|
<mime_type>text/x-iosrc</mime_type>
|
|
</config>
|
|
<rules>
|
|
<state name="root">
|
|
<rule pattern="\n">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="\s+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="//(.*?)\n">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern="#(.*?)\n">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern="/(\\\n)?[*](.|\n)*?[*](\\\n)?/">
|
|
<token type="CommentMultiline"/>
|
|
</rule>
|
|
<rule pattern="/\+">
|
|
<token type="CommentMultiline"/>
|
|
<push state="nestedcomment"/>
|
|
</rule>
|
|
<rule pattern=""(\\\\|\\"|[^"])*"">
|
|
<token type="LiteralString"/>
|
|
</rule>
|
|
<rule pattern="::=|:=|=|\(|\)|;|,|\*|-|\+|>|<|@|!|/|\||\^|\.|%|&|\[|\]|\{|\}">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="(clone|do|doFile|doString|method|for|if|else|elseif|then)\b">
|
|
<token type="Keyword"/>
|
|
</rule>
|
|
<rule pattern="(nil|false|true)\b">
|
|
<token type="NameConstant"/>
|
|
</rule>
|
|
<rule pattern="(Object|list|List|Map|args|Sequence|Coroutine|File)\b">
|
|
<token type="NameBuiltin"/>
|
|
</rule>
|
|
<rule pattern="[a-zA-Z_]\w*">
|
|
<token type="Name"/>
|
|
</rule>
|
|
<rule pattern="(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?">
|
|
<token type="LiteralNumberFloat"/>
|
|
</rule>
|
|
<rule pattern="\d+">
|
|
<token type="LiteralNumberInteger"/>
|
|
</rule>
|
|
</state>
|
|
<state name="nestedcomment">
|
|
<rule pattern="[^+/]+">
|
|
<token type="CommentMultiline"/>
|
|
</rule>
|
|
<rule pattern="/\+">
|
|
<token type="CommentMultiline"/>
|
|
<push/>
|
|
</rule>
|
|
<rule pattern="\+/">
|
|
<token type="CommentMultiline"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="[+/]">
|
|
<token type="CommentMultiline"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer> |