From: Jean Privat Date: Mon, 29 Jul 2013 19:11:17 +0000 (-0400) Subject: misc: add highlight syntax file X-Git-Tag: v0.6~3 X-Git-Url: http://nitlanguage.org misc: add highlight syntax file highlight is used by gitweb. Signed-off-by: Jean Privat --- diff --git a/misc/highlight/nit.lang b/misc/highlight/nit.lang new file mode 100644 index 0000000..1787113 --- /dev/null +++ b/misc/highlight/nit.lang @@ -0,0 +1,29 @@ +Description="Nit" + +Identifiers=[[ [a-zA-Z_][\w\-]* ]] + +Digits=[[ (?:0x|0X|0b)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)? ]] + +Keywords={ + { Id=1, + 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"}, + }, + { Id=2, + Regex=[[[A-Z][\/\w]+]], + }, +} + +Strings={ + Delimiter=[["""|'''|"|'|`]], + Escape = [[ \{[^}]*\} ]], +} + +IgnoreCase=false + +Comments={ + { Block=false, + Delimiter= { [[#]] }, + } +} + +Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\.|\&|\<|\>|\!|\-|\+|\/|\*|\=|\?|\%|\|]]