Commit b755c35b authored by Nibaldo González's avatar Nibaldo González Committed by Sébastien Wilmet
Browse files

rust.lang: add i128 & u128, and allow underscores in unicode escapes

Changes in Rust highlighting:
* Add missing types (keywords) and missing integer suffixes: `i128` & `u128`
	* https://doc.rust-lang.org/std/primitive.i128.html
	* https://doc.rust-lang.org/std/primitive.u128.html
* Fix: Allow underscores in unicode escapes: https://github.com/rust-lang/rust/pull/43716

Sources:
* Rust documentation: https://doc.rust-lang.org/
* Rust in Vim: https://github.com/rust-lang/rust.vim/blob/master/syntax/rust.vim
* Rust in ACE: https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/rust_highlight_rules.js
parent 472515ec
......@@ -128,10 +128,12 @@ except according to those terms.
<keyword>i16</keyword>
<keyword>i32</keyword>
<keyword>i64</keyword>
<keyword>i128</keyword>
<keyword>u8</keyword>
<keyword>u16</keyword>
<keyword>u32</keyword>
<keyword>u64</keyword>
<keyword>u128</keyword>
<keyword>f32</keyword>
<keyword>f64</keyword>
<keyword>char</keyword>
......@@ -149,7 +151,7 @@ except according to those terms.
</context>
<define-regex id="int-suffix" extended="true">
(i8|i16|i32|i64|isize|u8|u16|u32|u64|usize)
(i8|i16|i32|i64|i128|isize|u8|u16|u32|u64|u128|usize)
</define-regex>
<define-regex id="exponent" extended="true">
......@@ -230,7 +232,7 @@ except according to those terms.
</define-regex>
<define-regex id="unicode-escape" extended="true">
u{\%{hex-digit}{1,6}}
u{(\%{hex-digit}_*){1,6}}
</define-regex>
<context id="string-escape" style-ref="def:special-char">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment