From 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 May 2017 15:10:37 +0200 Subject: fix build issues and add typedoc --- node_modules/highlight.js/lib/languages/rust.js | 107 ++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 node_modules/highlight.js/lib/languages/rust.js (limited to 'node_modules/highlight.js/lib/languages/rust.js') diff --git a/node_modules/highlight.js/lib/languages/rust.js b/node_modules/highlight.js/lib/languages/rust.js new file mode 100644 index 000000000..104d74927 --- /dev/null +++ b/node_modules/highlight.js/lib/languages/rust.js @@ -0,0 +1,107 @@ +module.exports = function(hljs) { + var NUM_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\?'; + var KEYWORDS = + '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 Self sizeof static struct super trait true ' + + 'type typeof unsafe unsized use virtual while where yield move default'; + var BUILTINS = + // functions + 'drop ' + + // types + 'i8 i16 i32 i64 i128 isize ' + + 'u8 u16 u32 u64 u128 usize ' + + 'f32 f64 ' + + 'str char bool ' + + 'Box Option Result String Vec ' + + // traits + 'Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug ' + + 'PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator ' + + 'Extend IntoIterator DoubleEndedIterator ExactSizeIterator ' + + 'SliceConcatExt ToString ' + + // macros + 'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' + + 'debug_assert! debug_assert_eq! env! panic! 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! macro_rules! assert_ne! debug_assert_ne!'; + return { + aliases: ['rs'], + keywords: { + keyword: + KEYWORDS, + literal: + 'true false Some None Ok Err', + built_in: + BUILTINS + }, + lexemes: hljs.IDENT_RE + '!?', + illegal: '' + } + ] + }; +}; \ No newline at end of file -- cgit v1.2.3