Skip to content

Commit 7ffcd78

Browse files
authored
Merge pull request #10 from harpocrates/enhancement/128-bit-integers
Added 128bit ints
2 parents ebdc91b + 969d95e commit 7ffcd78

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Language/Rust/Parser/Parser2.y

+2
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,8 @@ lit (Spanned (LiteralTok litTok suffix_m) s) = Spanned (parseLit litTok suffix s
914914
(Just (Name "u32")) -> U32
915915
(Just (Name "i64")) -> I64
916916
(Just (Name "u64")) -> U64
917+
(Just (Name "i128")) -> I128
918+
(Just (Name "u128")) -> U128
917919
918920
isPathSegmentIdent :: Ident -> Bool
919921
isPathSegmentIdent i = True

src/Language/Rust/Syntax/AST.hs

+4-2
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ data LifetimeDef a
432432
-- Merged [FloatTy](https://docs.serde.rs/syntex_syntax/ast/enum.FloatTy.html)
433433
data Suffix
434434
= Unsuffixed
435-
| Is | I8 | I16 | I32 | I64
436-
| Us | U8 | U16 | U32 | U64
435+
| Is | I8 | I16 | I32 | I64 | I128
436+
| Us | U8 | U16 | U32 | U64 | U128
437437
| F32 | F64
438438
deriving (Eq, Enum, Bounded)
439439

@@ -444,11 +444,13 @@ instance Show Suffix where
444444
show I16 = "i16"
445445
show I32 = "i32"
446446
show I64 = "i64"
447+
show I128 = "i128"
447448
show Us = "usize"
448449
show U8 = "u8"
449450
show U16 = "u16"
450451
show U32 = "u32"
451452
show U64 = "u64"
453+
show U128 = "u128"
452454
show F32 = "f32"
453455
show F64 = "f64"
454456

0 commit comments

Comments
 (0)