vendor: 4,129 bytes, lines 1-49
1/*! `csharp` grammar compiled for Highlight.js 11.11.1 */ 2(()=>{var e=(()=>{"use strict";return e=>{const n={ 3keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"]), 4built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"], 5literal:["default","false","null","true"]},a=e.inherit(e.TITLE_MODE,{ 6begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{ 7begin:"\\b(0b[01']+)"},{ 8begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ 9begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" 10}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] 11},r=e.inherit(s,{illegal:/\n/}),t={className:"subst",begin:/\{/,end:/\}/, 12keywords:n},l=e.inherit(t,{illegal:/\n/}),c={className:"string",begin:/\$"/, 13end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ 14},e.BACKSLASH_ESCAPE,l]},o={className:"string",begin:/\$@"/,end:'"',contains:[{ 15begin:/\{\{/},{begin:/\}\}/},{begin:'""'},t]},d=e.inherit(o,{illegal:/\n/, 16contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]}) 17;t.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE], 18l.contains=[d,c,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{ 19illegal:/\n/})];const g={variants:[{className:"string", 20begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1 21},o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">", 22contains:[{beginKeywords:"in out"},a] 23},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={ 24begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], 25keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, 26contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ 27begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}] 28}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", 29end:"$",keywords:{ 30keyword:"if else elif endif define undef warning error line region endregion pragma checksum" 31}},g,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, 32illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" 33},a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", 34relevance:0,end:/[{;=]/,illegal:/[^\s:]/, 35contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ 36beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, 37contains:[a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", 38begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ 39className:"string",begin:/"/,end:/"/}]},{ 40beginKeywords:"new return throw await else",relevance:0},{className:"function", 41begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, 42end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ 43beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", 44relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, 45contains:[e.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params", 46begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, 47contains:[g,i,e.C_BLOCK_COMMENT_MODE] 48},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}})() 49;hljs.registerLanguage("csharp",e)})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.