Check lower bounds for numeric literals, and permit 128-bit literals

This commit is contained in:
ayazhafiz 2022-02-02 23:35:57 -05:00
parent a8b02831e5
commit 097c5afc73
16 changed files with 883 additions and 220 deletions

View file

@ -109,6 +109,16 @@ pub enum IntErrorKind {
Underflow,
/// This is an integer, but it has a float numeric suffix.
FloatSuffix,
/// The integer literal overflows the width of the suffix associated with it.
OverflowsSuffix {
suffix_type: &'static str,
max_value: u128,
},
/// The integer literal underflows the width of the suffix associated with it.
UnderflowsSuffix {
suffix_type: &'static str,
min_value: i128,
},
}
/// Enum to store the various types of errors that can cause parsing a float to fail.