Skip to content

Commit 9ef37ea

Browse files
TheIronBornJayflux
authored andcommitted
add u128/i128 syntax (#257)
* add u128/i128 suffixes * add u128 tests * small fix
1 parent 309cd3b commit 9ef37ea

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

RustEnhanced.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ variables:
99
identifier: '(?:[[:alpha:]][_[:alnum:]]*|_[_[:alnum:]]+)'
1010
escaped_byte: '\\([nrt0\"''\\]|x\h{2})'
1111
escaped_char: '\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})'
12-
int_suffixes: '[iu](?:8|16|32|64|size)'
12+
int_suffixes: '[iu](?:8|16|32|64|128|size)'
1313
float_suffixes: 'f(32|64)'
1414
contexts:
1515
main:

syntax_test_rust.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ let raw_bytes = br#"This won't escape anything either \x01 \""#;
142142
//^^^^^^^^^ constant.numeric.integer.octal
143143
// ^^^ storage.type - constant.numeric.integer.octal
144144

145+
0x12e15e35b500f16e2e714eb2b37916a5_u128;
146+
// <- constant.numeric.integer.hexadecimal
147+
// <- constant.numeric.integer.hexadecimal
148+
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant.numeric.integer.hexadecimal
149+
// ^^^^ storage.type - constant.numeric.integer.hexadecimal
150+
145151
extern crate foo;
146152
// <- keyword.other
147153
//^^^^ keyword.other

0 commit comments

Comments
 (0)