mirror of
https://github.com/cheat/cheat.git
synced 2024-11-24 06:51:36 +01:00
1790aec85d
Bump `alecthomas/chroma` to `v2`: https://github.com/cheat/cheat/issues/735
59 lines
1.9 KiB
XML
59 lines
1.9 KiB
XML
<lexer>
|
||
<config>
|
||
<name>APL</name>
|
||
<alias>apl</alias>
|
||
<filename>*.apl</filename>
|
||
</config>
|
||
<rules>
|
||
<state name="root">
|
||
<rule pattern="\s+">
|
||
<token type="Text"/>
|
||
</rule>
|
||
<rule pattern="[⍝#].*$">
|
||
<token type="CommentSingle"/>
|
||
</rule>
|
||
<rule pattern="\'((\'\')|[^\'])*\'">
|
||
<token type="LiteralStringSingle"/>
|
||
</rule>
|
||
<rule pattern=""(("")|[^"])*"">
|
||
<token type="LiteralStringDouble"/>
|
||
</rule>
|
||
<rule pattern="[⋄◇()]">
|
||
<token type="Punctuation"/>
|
||
</rule>
|
||
<rule pattern="[\[\];]">
|
||
<token type="LiteralStringRegex"/>
|
||
</rule>
|
||
<rule pattern="⎕[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*">
|
||
<token type="NameFunction"/>
|
||
</rule>
|
||
<rule pattern="[A-Za-zΔ∆⍙_][A-Za-zΔ∆⍙_¯0-9]*">
|
||
<token type="NameVariable"/>
|
||
</rule>
|
||
<rule pattern="¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?">
|
||
<token type="LiteralNumber"/>
|
||
</rule>
|
||
<rule pattern="[\.\\/⌿⍀¨⍣⍨⍠⍤∘⍥@⌺⌶⍢]">
|
||
<token type="NameAttribute"/>
|
||
</rule>
|
||
<rule pattern="[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗⊆⍸]">
|
||
<token type="Operator"/>
|
||
</rule>
|
||
<rule pattern="⍬">
|
||
<token type="NameConstant"/>
|
||
</rule>
|
||
<rule pattern="[⎕⍞]">
|
||
<token type="NameVariableGlobal"/>
|
||
</rule>
|
||
<rule pattern="[←→]">
|
||
<token type="KeywordDeclaration"/>
|
||
</rule>
|
||
<rule pattern="[⍺⍵⍶⍹∇:]">
|
||
<token type="NameBuiltinPseudo"/>
|
||
</rule>
|
||
<rule pattern="[{}]">
|
||
<token type="KeywordType"/>
|
||
</rule>
|
||
</state>
|
||
</rules>
|
||
</lexer> |