809
by William Grant
Merge killall-editarea branch. We now use CodePress instead, which is |
1 |
/*
|
2 |
* CodePress regular expressions for C# syntax highlighting
|
|
3 |
* By Edwin de Jonge
|
|
4 |
*/
|
|
5 |
||
6 |
Language.syntax = [ // C# |
|
7 |
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote |
|
8 |
{ input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote |
|
9 |
{ 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 : '<b>$1</b>' }, // reserved words |
|
10 |
{ input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '<a>$1</a>' }, // types |
|
11 |
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments // |
|
12 |
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */ |
|
13 |
];
|
|
14 |
||
15 |
Language.snippets = []; |
|
16 |
||
17 |
Language.complete = [ // Auto complete only for 1 character |
|
18 |
{input : '\'',output : '\'$0\'' }, |
|
19 |
{input : '"', output : '"$0"' }, |
|
20 |
{input : '(', output : '\($0\)' }, |
|
21 |
{input : '[', output : '\[$0\]' }, |
|
22 |
{input : '{', output : '{\n\t$0\n}' } |
|
23 |
];
|
|
24 |
||
25 |
Language.shortcuts = []; |