builtin: remove u8 for now

pull/10986/head^2
Alexander Medvednikov 2021-07-28 22:35:51 +03:00
parent 7704685458
commit 65126efdc3
2 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ fn abs64(x i64) u64 {
//=========================================
// convert from data format to compact u64
pub fn get_str_intp_u64_format(fmt_type StrIntpType, in_width int, in_precision int, in_tail_zeros bool, in_sign bool, in_pad_ch u8, in_base int, in_upper_case bool) u64 {
pub fn get_str_intp_u64_format(fmt_type StrIntpType, in_width int, in_precision int, in_tail_zeros bool, in_sign bool, in_pad_ch byte, in_base int, in_upper_case bool) u64 {
width := if in_width != 0 { abs64(in_width) } else { u64(0) }
allign := if in_width > 0 { u64(1 << 5) } else { u64(0) } // two bit 0 .left 1 .rigth, for now we use only one
upper_case := if in_upper_case { u64(1 << 7) } else { u64(0) }
@ -136,7 +136,7 @@ pub fn get_str_intp_u64_format(fmt_type StrIntpType, in_width int, in_precision
}
// convert from data format to compact u32
pub fn get_str_intp_u32_format(fmt_type StrIntpType, in_width int, in_precision int, in_tail_zeros bool, in_sign bool, in_pad_ch u8, in_base int, in_upper_case bool) u32 {
pub fn get_str_intp_u32_format(fmt_type StrIntpType, in_width int, in_precision int, in_tail_zeros bool, in_sign bool, in_pad_ch byte, in_base int, in_upper_case bool) u32 {
width := if in_width != 0 { abs64(in_width) } else { u32(0) }
allign := if in_width > 0 { u32(1 << 5) } else { u32(0) } // two bit 0 .left 1 .rigth, for now we use only one
upper_case := if in_upper_case { u32(1 << 7) } else { u32(0) }

View File

@ -110,7 +110,7 @@ fn (mut g Gen) str_format(node ast.StringInterLiteral, i int) (u64, string) {
pad_ch = 1
}
res := get_str_intp_u32_format(fmt_type, node.fwidths[i], node.precisions[i], remove_tail_zeros,
node.pluss[i], pad_ch, base, upper_case)
node.pluss[i], byte(pad_ch), base, upper_case)
//
return res, fmt_type.str()
}