var D_KEYWORDS = "abstract alias align asm assert auto " + "body bool break byte " + "case cast catch cdouble cent cfloat char class const continue creal " + "dchar debug default delegate delete deprecated do double " + "else enum export extern " + "false final finally float for foreach function foreach_reverse " + "goto " + "idouble if ifloat import in inout int interface invariant ireal is " + "lazy long " + "macro mixin module " + "new nothrow null " + "out override " + "package pragma private protected public pure " + "real ref return scope shared short static struct super switch synchronized " + "template this throw true try typedef typeid typeof " + "ubyte ucent uint ulong union unittest ushort " + "version void volatile " + "wchar while with " + "__FILE__ __LINE__ __gshared __thread __traits "; PR.registerLangHandler( PR.createSimpleLexer( [ // Whitespace [PR.PR_PLAIN,/^\s+/, null,' \r\n\t\xA0'] ], [ [PR.PR_COMMENT,/^\/\/[^\r\n]*/, null], [PR.PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/, null], [PR.PR_COMMENT,/^\/\+[\s\S]*?(?:\+\/|$)/, null], //StringLiteral //WysiwygString or HexString or DelimitedString [PR.PR_STRING,/^[qrx]\"(?:[^\"]|[\s\S])*?(?:\"[cwd]?|$)/, null], //TokenString [PR.PR_STRING,/^q\{(?:[^\}]|[\s\S])*?(?:\}|$)/, null], //AlternateWysiwygString [PR.PR_STRING,/^\`(?:[^\`]|[\s\S])*?(?:\`[cwd]?|$)/, null], //DoubleQuotedString [PR.PR_STRING,/^\"(?:[^\"]|[\s\S])*?(?:\"[cwd]?|$)/, null], //SingleQuotedString [PR.PR_STRING,/^\'(?:[^\']|[\s\S])*?(?:\'[cwd]?|$)/, null], //keywords [PR.PR_KEYWORD,new RegExp('^(?:' + D_KEYWORDS.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '|') + ')\\b'), null], //identifier [PR.PR_PLAIN,/^[a-z_$][a-z_$@0-9]*/i, null], //FloatLiteral //DecimalFloat [PR.PR_LITERAL,/^(?:[0-9_]+\.(?:[0-9_]+(?:e[+-]?[0-9_]+)?)?|\.[0-9_]+(?:e[+-]?[0-9_]+)?|[0-9_]+e[+-]?[0-9_]+)[fil]?i?/i,null], //HexFloat [PR.PR_LITERAL,/^(?:0x[0-9a-f_]+\.[0-9a-f_]+p[+-]?[0-9_]+|0x\.[0-9a-f_]+p[+-]?[0-9_]+|0x[0-9a-f_]+p[+-]?[0-9_]+)[fil]?i?/i,null], //IntegerLiteral //Hexadecimal Binary [PR.PR_LITERAL,/^0[bx][a-f0-9_]+[lu]?[lu]?/i,null], //Octal [PR.PR_LITERAL,/^0[0-7_]+[lu]?[lu]?/i,null], //Decimal [PR.PR_LITERAL,/^(?:0|[1-9]?[0-9_]+)[lu]?[lu]?/i,null], [PR.PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null] ]), ['d']);