/usr/share/highlight/langDefs/nim.lang is in highlight-common 3.41-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | Description="Nim"
Digits=[[ (?:0[xXbBcCo])[0-9a-fA-F]+|\d+'?[iufd]\d*|\d*[\.\_]?\d+(?:[iu]\d+)?[lLuU]? ]]
Keywords={
{ Id=1,
List={"addr", "and", "as", "asm", "atomic", "bind", "block", "break", "case",
"cast", "concept", "const", "continue", "converter", "defer", "discard",
"distinct", "div", "do", "elif", "else", "end", "enum", "except", "export",
"finally", "for", "from", "func", "generic", "if", "import", "in", "include",
"interface", "is", "isnot", "iterator", "let", "macro", "method", "mixin",
"mod", "nil", "not", "notin", "object", "of", "or", "out", "proc", "ptr",
"raise", "ref", "return", "shl", "shr", "static", "template", "try", "tuple",
"type", "using", "var", "when", "while", "with", "without", "xor", "yield"
}
},
{ Id=2,
List= {"int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64",
"float", "float32", "float64", "char", "string", "pointer"}
},
{ Id=3,
List= {}
},
{ Id=4,
Regex=[[(\w+)\s*\(]]
}
}
Strings = {
Delimiter=[["""|"|'|`]],
RawPrefix="r",
Escape=[=[\\[ntvbrfa\\\?'"]|\\\d{3}|\\x[[:xdigit:]]{2}]=],
}
--allow #, ##, #[..]#, ##[..]##
Comments = {
{ Block=false,
Delimiter= { [=[ ##(?!\[)|#(?![\[#]) ]=] },
},
{ Block=true,
Nested=true,
Delimiter = { [[ ##?\[ ]], [[ \]##? ]] }
}
}
IgnoreCase=false
Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^]]
|