roulette/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/io.xml

71 lines
2.0 KiB
XML
Raw Normal View History

2023-09-14 22:37:22 +00:00
<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="&#34;(\\\\|\\&#34;|[^&#34;])*&#34;">
<token type="LiteralString"/>
</rule>
<rule pattern="::=|:=|=|\(|\)|;|,|\*|-|\+|&gt;|&lt;|@|!|/|\||\^|\.|%|&amp;|\[|\]|\{|\}">
<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>