From 027d8a71bd28ab970268aa537d69d18de95f749a Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 29 Jul 2013 15:11:17 -0400 Subject: [PATCH] misc: add highlight syntax file highlight is used by gitweb. Signed-off-by: Jean Privat --- misc/highlight/nit.lang | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 misc/highlight/nit.lang 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=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\.|\&|\<|\>|\!|\-|\+|\/|\*|\=|\?|\%|\|]] -- 1.7.9.5