jquery.syntax.brush.csharp.js 1.41 KB
// This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
Syntax.register("csharp",function(a){a.push(["this","true","false","null"],{klass:"constant"});a.push("object bool byte fixed float uint char ulong ushort decimal int sbyte short void long string double".split(" "),{klass:"type"});a.push("abstract add alias ascending base break case catch class const continue default delegate descending do dynamic else enum event explicit extern finally for foreach from get global goto group if implicit in interface into join let lock namespace new operator orderby out override params partial readonly ref remove return sealed select set stackalloc static struct switch throw try unsafe using value var virtual volatile where while yield".split(" "),
{klass:"keyword"});a.push("+ - * / % & | ^ ! ~ && || ++ -- << >> == != < > <= >= = ? new as is sizeof typeof checked unchecked".split(" "),{klass:"operator"});a.push(["public","private","internal","protected"],{klass:"access"});a.push(Syntax.lib.cStyleFunction);a.push({pattern:/(?:\.)([a-z_][a-z0-9_]+)/gi,matches:Syntax.extractMatches({klass:"function"})});a.push(Syntax.lib.camelCaseType);a.push(Syntax.lib.cStyleComment);a.push(Syntax.lib.cppStyleComment);a.push(Syntax.lib.webLink);a.push(Syntax.lib.singleQuotedString);
a.push(Syntax.lib.doubleQuotedString);a.push(Syntax.lib.stringEscape);a.push(Syntax.lib.decimalNumber);a.push(Syntax.lib.hexNumber)});