2024-08-02 20:03:49 +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=""(\\\\|\\"|[^"])*"">
|
|
|
|
<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>
|
2024-08-26 23:18:28 +00:00
|
|
|
</lexer>
|