1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v2: match cgen; use as for casting

This commit is contained in:
Alexander Medvednikov
2020-02-07 14:49:14 +01:00
parent 27719ded9b
commit 9034b1fd08
14 changed files with 154 additions and 73 deletions

View File

@@ -94,7 +94,7 @@ const (
// f64 constants
//
DIGITS = 18
DOUBLE_PLUS_ZERO = u64(0x0000000000000000)
DOUBLE_PLUS_ZERO = u64(0x0000000000000000)// as u64
DOUBLE_MINUS_ZERO = 0x8000000000000000
DOUBLE_PLUS_INFINITY = 0x7FF0000000000000
DOUBLE_MINUS_INFINITY = 0xFFF0000000000000
@@ -128,7 +128,7 @@ const (
MINUS = `-`
ZERO = `0`
NINE = `9`
TEN = u32(10)
TEN = 10// as u32
)
/**********************************************************************
*
@@ -179,7 +179,7 @@ pub struct PrepNumber {
pub mut:
negative bool=false // 0 if positive number, 1 if negative
exponent int=0 // power of 10 exponent
mantissa u64=u64(0) // integer mantissa
mantissa u64=0 as u64 // integer mantissa
}
/**********************************************************************
*

View File

@@ -9,7 +9,7 @@ const (
// int_size = 32 << (~u32(0) >> 63)
// max_u64 = u64(u64(1 << 63) - 1)
int_size = 32
max_u64 = u64(C.UINT64_MAX) // use this until we add support
max_u64 = u64(C.UINT64_MAX)// as u64 // use this until we add support
)
fn byte_to_lower(c byte) byte {