Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 128bit ints #10

Merged
merged 1 commit into from
Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Language/Rust/Parser/Parser2.y
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ lit (Spanned (LiteralTok litTok suffix_m) s) = Spanned (parseLit litTok suffix s
(Just (Name "u32")) -> U32
(Just (Name "i64")) -> I64
(Just (Name "u64")) -> U64
(Just (Name "i128")) -> I128
(Just (Name "u128")) -> U128

isPathSegmentIdent :: Ident -> Bool
isPathSegmentIdent i = True
Expand Down
6 changes: 4 additions & 2 deletions src/Language/Rust/Syntax/AST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ data LifetimeDef a
-- Merged [FloatTy](https://docs.serde.rs/syntex_syntax/ast/enum.FloatTy.html)
data Suffix
= Unsuffixed
| Is | I8 | I16 | I32 | I64
| Us | U8 | U16 | U32 | U64
| Is | I8 | I16 | I32 | I64 | I128
| Us | U8 | U16 | U32 | U64 | U128
| F32 | F64
deriving (Eq, Enum, Bounded)

Expand All @@ -444,11 +444,13 @@ instance Show Suffix where
show I16 = "i16"
show I32 = "i32"
show I64 = "i64"
show I128 = "i128"
show Us = "usize"
show U8 = "u8"
show U16 = "u16"
show U32 = "u32"
show U64 = "u64"
show U128 = "u128"
show F32 = "f32"
show F64 = "f64"

Expand Down