0

Update to 8.0

This commit is contained in:
Rogaboru Kujimoshi
2014-06-08 21:04:39 +04:00
parent 81d0115677
commit a52831ccdb
134 changed files with 10392 additions and 4999 deletions

View File

@@ -3,51 +3,76 @@ Language: C#
Author: Jason Diamond <jason@diamond.name>
*/
hljs.LANGUAGES['cs'] = function(hljs) {
function(hljs) {
var KEYWORDS =
// Normal keywords.
'abstract as base bool break byte case catch char checked const continue decimal ' +
'default delegate do double else enum event explicit extern false finally fixed float ' +
'for foreach goto if implicit in int interface internal is lock long new null ' +
'object operator out override params private protected public readonly ref return sbyte ' +
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' +
'uint ulong unchecked unsafe ushort using virtual volatile void while async await ' +
// Contextual keywords.
'ascending descending from get group into join let orderby partial select set value var ' +
'where yield';
return {
defaultMode: {
keywords:
// Normal keywords.
'abstract as base bool break byte case catch char checked class const continue decimal ' +
'default delegate do double else enum event explicit extern false finally fixed float ' +
'for foreach goto if implicit in int interface internal is lock long namespace new null ' +
'object operator out override params private protected public readonly ref return sbyte ' +
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' +
'uint ulong unchecked unsafe ushort using virtual volatile void while ' +
// Contextual keywords.
'ascending descending from get group into join let orderby partial select set value var '+
'where yield',
contains: [
{
className: 'comment',
begin: '///', end: '$', returnBegin: true,
contains: [
{
className: 'xmlDocTag',
begin: '///|<!--|-->'
},
{
className: 'xmlDocTag',
begin: '</?', end: '>'
aliases: ['csharp'],
keywords: KEYWORDS,
illegal: /::/,
contains: [
{
className: 'comment',
begin: '///', end: '$', returnBegin: true,
contains: [
{
className: 'xmlDocTag',
variants: [
{
begin: '///', relevance: 0
},
{
begin: '<!--|-->'
},
{
begin: '</?', end: '>'
}
]
}
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'preprocessor',
begin: '#', end: '$',
keywords: 'if else elif endif define undef warning error line region endregion pragma checksum'
},
{
className: 'string',
begin: '@"', end: '"',
contains: [{begin: '""'}]
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
beginKeywords: 'protected public private internal', end: /[{;=]/,
keywords: KEYWORDS,
contains: [
{
beginKeywords: 'class namespace interface',
starts: {
contains: [hljs.TITLE_MODE]
}
]
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
{
className: 'preprocessor',
begin: '#', end: '$',
keywords: 'if else elif endif define undef warning error line region endregion pragma checksum'
},
{
className: 'string',
begin: '@"', end: '"',
contains: [{begin: '""'}]
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE
]
}
},
{
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
contains: [
hljs.TITLE_MODE
]
}
]
}
]
};
}(hljs);
}