From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/highlight.js/lib/languages/cs.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'node_modules/highlight.js/lib/languages/cs.js') diff --git a/node_modules/highlight.js/lib/languages/cs.js b/node_modules/highlight.js/lib/languages/cs.js index f68039222..b92473c31 100644 --- a/node_modules/highlight.js/lib/languages/cs.js +++ b/node_modules/highlight.js/lib/languages/cs.js @@ -3,12 +3,11 @@ module.exports = function(hljs) { keyword: // Normal keywords. 'abstract as base bool break byte case catch char checked const continue decimal ' + - 'default delegate do double else enum event explicit extern finally fixed float ' + - 'for foreach goto if implicit in int interface internal is lock long ' + + 'default delegate do double enum event explicit extern finally fixed float ' + + 'for foreach goto if implicit in int interface internal is lock long nameof ' + 'object operator out override params private protected public readonly ref sbyte ' + 'sealed short sizeof stackalloc static string struct switch this try typeof ' + 'uint ulong unchecked unsafe ushort using virtual void volatile while ' + - 'nameof ' + // Contextual keywords. 'add alias ascending async await by descending dynamic equals from get global group into join ' + 'let on orderby partial remove select set value var where yield', @@ -72,6 +71,7 @@ module.exports = function(hljs) { }; var TYPE_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '(\\s*,\\s*' + hljs.IDENT_RE + ')*>)?(\\[\\])?'; + return { aliases: ['csharp'], keywords: KEYWORDS, @@ -105,7 +105,9 @@ module.exports = function(hljs) { { className: 'meta', begin: '#', end: '$', - keywords: {'meta-keyword': 'if else elif endif define undef warning error line region endregion pragma checksum'} + keywords: { + 'meta-keyword': 'if else elif endif define undef warning error line region endregion pragma checksum' + } }, STRING, hljs.C_NUMBER_MODE, @@ -127,16 +129,24 @@ module.exports = function(hljs) { hljs.C_BLOCK_COMMENT_MODE ] }, + { + // [Attributes("")] + className: 'meta', + begin: '^\\s*\\[', excludeBegin: true, end: '\\]', excludeEnd: true, + contains: [ + {className: 'meta-string', begin: /"/, end: /"/} + ] + }, { // Expression keywords prevent 'keyword Name(...)' from being // recognized as a function definition - beginKeywords: 'new return throw await', + beginKeywords: 'new return throw await else', relevance: 0 }, { className: 'function', - begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/, - excludeEnd: true, + begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, + end: /[{;=]/, excludeEnd: true, keywords: KEYWORDS, contains: [ { -- cgit v1.2.3