Skip to content

Commit 732b5fc

Browse files
authored
Merge pull request #133 from wdv4758h/welcome_128
Support i128 and u128
2 parents eed97e7 + cec3ad2 commit 732b5fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

syntax/rust.vim

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ syn match rustMacroVariable "$\w\+"
6969
syn keyword rustReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro
7070

7171
" Built-in types {{{2
72-
syn keyword rustType isize usize char bool u8 u16 u32 u64 f32
73-
syn keyword rustType f64 i8 i16 i32 i64 str Self
72+
syn keyword rustType isize usize char bool u8 u16 u32 u64 u128 f32
73+
syn keyword rustType f64 i8 i16 i32 i64 i128 str Self
7474

7575
" Things from the libstd v1 prelude (src/libstd/prelude/v1.rs) {{{2
7676
" This section is just straight transformation of the contents of the prelude,
@@ -150,10 +150,10 @@ syn region rustDerive start="derive(" end=")" contained contains=rustDer
150150
syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy
151151

152152
" Number literals
153-
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
154-
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
155-
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
156-
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
153+
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
154+
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
155+
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
156+
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
157157

158158
" Special case for numbers of the form "1." which are float literals, unless followed by
159159
" an identifier, which makes them integer literals with a method call or field access,

0 commit comments

Comments
 (0)