|
| 1 | +## D programming Language |
| 2 | +syntax "D" "\.d$" |
| 3 | +magic "^(D) (source|program)" |
| 4 | +comment "//" |
| 5 | +color green "\<(cast|void|bool|byte|ubyte|enum|short|ushort|interface|int|uint|long|ulong|float|double|real|char|wchar|dchar|struct|union|class|function|delegate|template|immutable)\>" |
| 6 | +color green "\<(for|if|while|do|else|case|default|switch|foreach|foreach_reverse|with)\>" |
| 7 | +color green "\<(try|throw|catch|scope|finally)\>" |
| 8 | +color green "\<(align|asm|assert|auto|const|export|null|shared|typeid|typeof|final)\>" |
| 9 | +color brightmagenta "\<(goto|continue|break|return)\>" |
| 10 | +color brightcyan "\<(import|pragma|version|mixin|module|macro)\>" |
| 11 | +color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" |
| 12 | + |
| 13 | +## numbers |
| 14 | +color brightwhite "0?(b|B)[01_]+" "octal![0-7]+" "0?(x|X)[0-9A-Fa-f_]+" |
| 15 | +color normal "octal" |
| 16 | + |
| 17 | +## accessors and other class/struct keywords |
| 18 | +color blue "\<(abstract|override|package|private|protected|public|super|static|this|new)\>" |
| 19 | + |
| 20 | +## function traits and other function related keywords |
| 21 | +color green "\<(in|out|inout|ref|nothrow|pure|lazy)\>" |
| 22 | + |
| 23 | +## deprecated |
| 24 | +color brightwhite "deprecated" |
| 25 | + |
| 26 | +#Operator Color |
| 27 | +color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" "~" "\?" |
| 28 | + |
| 29 | +#Parenthetical Color |
| 30 | +color magenta "[(){}]" "\[" "\]" |
| 31 | + |
| 32 | +## |
| 33 | +## String highlighting. You will in general want your comments and |
| 34 | +## strings to come last, because syntax highlighting rules will be |
| 35 | +## applied in the order they are read in. |
| 36 | +color cyan ""(\\.|[^"])*"" "`(\\.|[^"])*`" |
| 37 | + |
| 38 | +## printf-family format specifiers |
| 39 | +color yellow "%(\#|(0-+))?(s|c|d|u|b|o|x|X|e|E|f|F|g|G|a|A|r)" |
| 40 | + |
| 41 | +## escape sequences |
| 42 | +color brightyellow "\\(\#|(0-+))?('|\"|\?|\\|0|a|b|f|n|r|t|v|x|u|U)" |
| 43 | + |
| 44 | +## Comment highlighting |
| 45 | +color brightblue "//.*" |
| 46 | +color brightblue start="/\*" end="\*/" |
| 47 | +color brightgreen start="/\+" end="\+/" |
| 48 | + |
| 49 | +## Trailing whitespace |
| 50 | +color ,green "[[:space:]]+$" |
0 commit comments