178711346219a4cecc70dd078819e022f37b717a
[nit.git] / misc / highlight / nit.lang
1 Description="Nit"
2
3 Identifiers=[[ [a-zA-Z_][\w\-]* ]]
4
5 Digits=[[ (?:0x|0X|0b)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)? ]]
6
7 Keywords={
8   { Id=1,
9     List={"abort", "abstract", "as", "assert", "break", "continue", "do", "else", "end", "enum", "extern", "for", "if", "import", "in", "interface", "intern", "intrude", "is", "isa", "isset", "new", "label", "loop", "private", "protected", "readable", "return", "super", "then", "while", "false", "null", "nullable", "redef", "self", "true", "and", "not", "or", "fun", "var", "type", "init", "class", "package", "module", "special", "universal", "writable"},
10   },
11   { Id=2,
12     Regex=[[[A-Z][\/\w]+]],
13   },
14 }
15
16 Strings={
17   Delimiter=[["""|'''|"|'|`]],
18   Escape = [[ \{[^}]*\} ]],
19 }
20
21 IgnoreCase=false
22
23 Comments={
24   { Block=false,
25     Delimiter= { [[#]] },
26   }
27 }
28
29 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\.|\&|\<|\>|\!|\-|\+|\/|\*|\=|\?|\%|\|]]