mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Hide RocDec implemntation details.
This commit is contained in:
parent
92ace8ff67
commit
ba6b225761
8 changed files with 26 additions and 16 deletions
|
@ -794,11 +794,14 @@ pub fn build_exp_literal<'a, 'ctx, 'env>(
|
|||
_ => panic!("Invalid layout for float literal = {:?}", layout),
|
||||
},
|
||||
|
||||
Decimal(int) => env
|
||||
Decimal(int) => {
|
||||
let (upper_bits, lower_bits) = int.as_bits();
|
||||
env
|
||||
.context
|
||||
.i128_type()
|
||||
.const_int(int.0 as u64, false)
|
||||
.into(),
|
||||
.const_int_arbitrary_precision(&[lower_bits, upper_bits as u64])
|
||||
.into()
|
||||
}
|
||||
Bool(b) => env.context.bool_type().const_int(*b as u64, false).into(),
|
||||
Byte(b) => env.context.i8_type().const_int(*b as u64, false).into(),
|
||||
Str(str_literal) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue