|
if (! this .sh_languages) {
this .sh_languages = {};
}
sh_languages[ 'csharp' ] = [
[
[
/\b(?:using)\b/g,
'sh_preproc' ,
-1
],
[
/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))(?:[FfDdMmUulL]+)?\b/g,
'sh_number' ,
-1
],
[
/(\b(?: class |struct|typename))([ \t]+)([A-Za-z0-9_]+)/g,
[ 'sh_keyword' , 'sh_normal' , 'sh_classname' ],
-1
],
[
/\b(?:abstract|event| new |struct| as |explicit| null | switch |base|extern| this | false |operator| throw | break |finally|out| true |fixed|override| try | case |params| typeof | catch | for | private |foreach| protected |checked|goto|public|unchecked| class | if |readonly|unsafe|const|implicit|ref| continue | in | return |virtual| default | interface |sealed|volatile|delegate|internal| do |is|sizeof| while |lock|stackalloc| else | static | enum |namespace|get|partial|set|value|where| yield )\b/g,
'sh_keyword' ,
-1
],
[
/\/\/\
'sh_comment' ,
1
],
[
/\/\
'sh_comment' ,
7
],
[
/\/\*\*/g,
'sh_comment' ,
8
],
[
/\/\*/g,
'sh_comment' ,
9
],
[
/(\bstruct)([ \t]+)([A-Za-z0-9_]+)/g,
[ 'sh_keyword' , 'sh_normal' , 'sh_classname' ],
-1
],
[
/^[ \t]* #(?:[ \t]*include)/g,
'sh_preproc' ,
10,
1
],
[
/^[ \t]* #(?:[ \t]*[A-Za-z0-9_]*)/g,
'sh_preproc' ,
-1
],
[
/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
'sh_number' ,
-1
],
[
/ "/g,
'sh_string',
13
],
[
/'/g,
'sh_string',
14
],
[
/\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void)\b/g,
'sh_type',
-1
],
[
/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
'sh_symbol',
-1
],
[
/\{|\}/g,
'sh_cbracket',
-1
],
[
/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,
'sh_function',
-1
],
[
/([A-Za-z](?:[^`~!@#$%&*()_=+{}|;:" ,<.>\/?'\\[\]\^\-\s]|[_])*)((?:<.*>)?)(\s+(?=[*&]*[A-Za-z][^`~!@#$%&*()_=+{}|;: ",<.>\/?'\\[\]\^\-\s]*\s*[`~!@#$%&*()_=+{}|;:" ,<.>\/?'\\[\]\^\-\[\]]+))/g,
[ 'sh_usertype' , 'sh_usertype' , 'sh_normal' ],
-1
]
],
[
[
/$/g,
null ,
-2
],
[
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
'sh_url' ,
-1
],
[
/<\?xml/g,
'sh_preproc' ,
2,
1
],
[
/<!DOCTYPE/g,
'sh_preproc' ,
4,
1
],
[
/<!--/g,
'sh_comment' ,
5
],
[
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
'sh_keyword' ,
-1
],
[
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
'sh_keyword' ,
6,
1
],
[
/&(?:[A-Za-z0-9]+);/g,
'sh_preproc' ,
-1
],
[
/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
'sh_keyword' ,
-1
],
[
/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
'sh_keyword' ,
6,
1
],
[
/@[A-Za-z]+/g,
'sh_type' ,
-1
],
[
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
'sh_todo' ,
-1
]
],
[
[
/\?>/g,
'sh_preproc' ,
-2
],
[
/([^= " \t>]+)([ \t]*)(=?)/g,
['sh_type', 'sh_normal', 'sh_symbol'],
-1
],
[
/" /g,
'sh_string' ,
3
]
],
[
[
/\\(?:\\| ")/g,
null,
-1
],
[
/" /g,
'sh_string' ,
-2
]
],
[
[
/>/g,
'sh_preproc' ,
-2
],
[
/([^= " \t>]+)([ \t]*)(=?)/g,
['sh_type', 'sh_normal', 'sh_symbol'],
-1
],
[
/" /g,
'sh_string' ,
3
]
],
[
[
/-->/g,
'sh_comment' ,
-2
],
[
/<!--/g,
'sh_comment' ,
5
]
],
[
[
/(?:\/)?>/g,
'sh_keyword' ,
-2
],
[
/([^= " \t>]+)([ \t]*)(=?)/g,
['sh_type', 'sh_normal', 'sh_symbol'],
-1
],
[
/" /g,
'sh_string' ,
3
]
],
[
[
/$/g,
null ,
-2
]
],
[
[
/\*\
'sh_comment' ,
-2
],
[
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
'sh_url' ,
-1
],
[
/<\?xml/g,
'sh_preproc' ,
2,
1
],
[
/<!DOCTYPE/g,
'sh_preproc' ,
4,
1
],
[
/<!--/g,
'sh_comment' ,
5
],
[
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,
'sh_keyword' ,
-1
],
[
/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,
'sh_keyword' ,
6,
1
],
[
/&(?:[A-Za-z0-9]+);/g,
'sh_preproc' ,
-1
],
[
/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,
'sh_keyword' ,
-1
],
[
/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,
'sh_keyword' ,
6,
1
],
[
/@[A-Za-z]+/g,
'sh_type' ,
-1
],
[
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
'sh_todo' ,
-1
]
],
[
[
/\*\
'sh_comment' ,
-2
],
[
/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,
'sh_url' ,
-1
],
[
/(?:TODO|FIXME|BUG)(?:[:]?)/g,
'sh_todo' ,
-1
]
],
[
[
/$/g,
null ,
-2
],
[
/</g,
'sh_string' ,
11
],
[
/ "/g,
'sh_string',
12
],
[
/\/\/\//g,
'sh_comment',
1
],
[
/\/\//g,
'sh_comment',
7
],
[
/\/\*\*/g,
'sh_comment',
8
],
[
/\/\*/g,
'sh_comment',
9
]
],
[
[
/$/g,
null,
-2
],
[
/>/g,
'sh_string',
-2
]
],
[
[
/$/g,
null,
-2
],
[
/\\(?:\\|" )/g,
null ,
-1
],
[
/ "/g,
'sh_string',
-2
]
],
[
[
/" /g,
'sh_string' ,
-2
],
[
/\\./g,
'sh_specialchar' ,
-1
]
],
[
[
/ '/g,
' sh_string ',
-2
],
[
/\\./g,
' sh_specialchar',
-1
]
]
];
|