mirror of
https://github.com/cheat/cheat.git
synced 2024-12-18 18:55:06 +01:00
1790aec85d
Bump `alecthomas/chroma` to `v2`: https://github.com/cheat/cheat/issues/735
58 lines
1.7 KiB
XML
58 lines
1.7 KiB
XML
<lexer>
|
|
<config>
|
|
<name>Whiley</name>
|
|
<alias>whiley</alias>
|
|
<filename>*.whiley</filename>
|
|
<mime_type>text/x-whiley</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="Text"/>
|
|
</rule>
|
|
<rule pattern="/[*](.|\n)*?[*]/">
|
|
<token type="CommentMultiline"/>
|
|
</rule>
|
|
<rule pattern="//.*?\n">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern="(function|import|from|method|property|type|with|variant)\b">
|
|
<token type="KeywordDeclaration"/>
|
|
</rule>
|
|
<rule pattern="(assert|assume|all|break|case|continue|debug|default|do|else|ensures|export|fail|final|for|if|in|is|native|no|new|private|protected|public|return|requires|skip|some|switch|unsafe|where|while)\b">
|
|
<token type="Keyword"/>
|
|
</rule>
|
|
<rule pattern="(true|false|null)\b">
|
|
<token type="KeywordConstant"/>
|
|
</rule>
|
|
<rule pattern="(bool|byte|int|void)\b">
|
|
<token type="KeywordType"/>
|
|
</rule>
|
|
<rule pattern="0b(?:_?[01])+">
|
|
<token type="LiteralNumberBin"/>
|
|
</rule>
|
|
<rule pattern="0[xX][0-9a-fA-F]+">
|
|
<token type="LiteralNumberHex"/>
|
|
</rule>
|
|
<rule pattern="(0|[1-9][0-9]*)">
|
|
<token type="LiteralNumberInteger"/>
|
|
</rule>
|
|
<rule pattern="[a-zA-Z_]\w*">
|
|
<token type="Name"/>
|
|
</rule>
|
|
<rule pattern="[+%=><|^!?/\-*&~:]">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="[{}()\[\],.;\|]">
|
|
<token type="Punctuation"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer>
|