/* * CodePress regular expressions for C# syntax highlighting * By Edwin de Jonge */ Language.syntax = [ // C# { input : /\"(.*?)(\"|
|<\/P>)/g, output : '"$1$2' }, // strings double quote { input : /\'(.?)(\'|
|<\/P>)/g, output : '\'$1$2' }, // strings single quote { input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|partial|private|protected|public|readonly|ref|return|set|sealed|sizeof|static|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|value|virtual|while)\b/g, output : '$1' }, // reserved words { input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '$1' }, // types { input : /([^:]|^)\/\/(.*?)(//$2$3' }, // comments // { input : /\/\*(.*?)\*\//g, output : '/*$1*/' } // comments /* */ ]; Language.snippets = []; Language.complete = [ // Auto complete only for 1 character {input : '\'',output : '\'$0\'' }, {input : '"', output : '"$0"' }, {input : '(', output : '\($0\)' }, {input : '[', output : '\[$0\]' }, {input : '{', output : '{\n\t$0\n}' } ]; Language.shortcuts = [];