Вход Регистрация
Файл: error-kitty/node_modules/highlight.js/lib/languages/cs.js
Строк: 105
<?php
module
.exports = 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 ' +
    
'protected public private internal ' +
    
// Contextual keywords.
    
'ascending descending from get group into join let orderby partial select set value var ' +
    
'where yield';
  var 
GENERIC_IDENT_RE hljs.IDENT_RE '(<' hljs.IDENT_RE '>)?';
  return {
    
aliases: ['csharp'],
    
keywordsKEYWORDS,
    
illegal: /::/,
    
contains: [
      {
        
className'comment',
        
begin'///'end'$'returnBegintrue,
        
contains: [
          {
            
className'xmlDocTag',
            
variants: [
              {
                
begin'///'relevance0
              
},
              {
                
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'class namespace interface'end: /[{;=]/,
        
illegal: /[^s:]/,
        
contains: [
          
hljs.TITLE_MODE,
          
hljs.C_LINE_COMMENT_MODE,
          
hljs.C_BLOCK_COMMENT_MODE
        
]
      },
      {
        
// this prevents 'new Name(...)' from being recognized as a function definition
        
beginKeywords'new'end: /s/,
        
relevance0
      
},
      {
        
className'function',
        
begin'(' GENERIC_IDENT_RE '\s+)+' hljs.IDENT_RE '\s*\('returnBegintrueend: /[{;=]/,
        
excludeEndtrue,
        
keywordsKEYWORDS,
        
contains: [
          {
            
beginhljs.IDENT_RE '\s*\('returnBegintrue,
            
contains: [hljs.TITLE_MODE]
          },
          {
            
className'params',
            
begin: /(/, end: /)/,
            
keywordsKEYWORDS,
            
contains: [
              
hljs.APOS_STRING_MODE,
              
hljs.QUOTE_STRING_MODE,
              
hljs.C_NUMBER_MODE,
              
hljs.C_BLOCK_COMMENT_MODE
            
]
          },
          
hljs.C_LINE_COMMENT_MODE,
          
hljs.C_BLOCK_COMMENT_MODE
        
]
      }
    ]
  };
};
?>
Онлайн: 1
Реклама