misc: add highlight syntax file
authorJean Privat <jean@pryen.org>
Mon, 29 Jul 2013 19:11:17 +0000 (15:11 -0400)
committerJean Privat <jean@pryen.org>
Mon, 29 Jul 2013 19:11:17 +0000 (15:11 -0400)
highlight is used by gitweb.

Signed-off-by: Jean Privat <jean@pryen.org>

misc/highlight/nit.lang [new file with mode: 0644]

diff --git a/misc/highlight/nit.lang b/misc/highlight/nit.lang
new file mode 100644 (file)
index 0000000..1787113
--- /dev/null
@@ -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=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\.|\&|\<|\>|\!|\-|\+|\/|\*|\=|\?|\%|\|]]