Вход Регистрация
Файл: error-kitty/node_modules/highlight.js/lib/languages/rust.js
Строк: 70
<?php
module
.exports = function(hljs) {
  return {
    
aliases: ['rs'],
    
keywords: {
      
keyword:
        
'alignof as be box break const continue crate do else enum extern ' +
        
'false fn for if impl in let loop match mod mut offsetof once priv ' +
        
'proc pub pure ref return self sizeof static struct super trait true ' +
        
'type typeof unsafe unsized use virtual while yield ' +
        
'int i8 i16 i32 i64 ' +
        
'uint u8 u32 u64 ' +
        
'float f32 f64 ' +
        
'str char bool',
      
built_in:
        
'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' +
        
'debug_assert! debug_assert_eq! env! fail! file! format! format_args! ' +
        
'include_bin! include_str! line! local_data_key! module_path! ' +
        
'option_env! print! println! select! stringify! try! unimplemented! ' +
        
'unreachable! vec! write! writeln!'
    
},
    
lexemeshljs.IDENT_RE '!?',
    
illegal'</',
    
contains: [
      
hljs.C_LINE_COMMENT_MODE,
      
hljs.C_BLOCK_COMMENT_MODE,
      
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegalnull}),
      {
        
className'string',
        
begin: /r(#*)".*?"1(?!#)/
      
},
      {
        
className'string',
        
begin: /'\?(xw{2}|uw{4}|Uw{8}|.)'/
      },
      {
        
begin: /'[a-zA-Z_][a-zA-Z0-9_]*/
      },
      {
        className: '
number',
        begin: '
\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\.[0-9_]+)?([uif](8|16|32|64)?)?)',
        relevance: 0
      },
      {
        className: '
function',
        beginKeywords: '
fn', end: '(\(|<)', excludeEnd: true,
        contains: [hljs.UNDERSCORE_TITLE_MODE]
      },
      {
        className: '
preprocessor',
        begin: '
#\[', end: '\]'
      
},
      {
        
beginKeywords'type'end'(=|<)',
        
contains: [hljs.UNDERSCORE_TITLE_MODE],
        
illegal'\S'
      
},
      {
        
beginKeywords'trait enum'end'({|<)',
        
contains: [hljs.UNDERSCORE_TITLE_MODE],
        
illegal'\S'
      
},
      {
        
beginhljs.IDENT_RE '::'
      
},
      {
        
begin'->'
      
}
    ]
  };
};
?>
Онлайн: 0
Реклама