mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: rune type for `` literals
This commit is contained in:
@@ -180,7 +180,7 @@ NOTE: #TOFIX need one char after the last char of the number
|
||||
fn parser(s string) (int,PrepNumber) {
|
||||
mut state := fsm_a
|
||||
mut digx := 0
|
||||
mut c := ` ` // initial value for kicking off the state machine
|
||||
mut c := byte(` `) // initial value for kicking off the state machine
|
||||
mut result := parser_ok
|
||||
mut expneg := false
|
||||
mut expexp := 0
|
||||
@@ -192,7 +192,8 @@ fn parser(s string) (int,PrepNumber) {
|
||||
// skip starting spaces
|
||||
fsm_a {
|
||||
if is_space(c) == true {
|
||||
c = s[i++]
|
||||
c = s[i]
|
||||
i++
|
||||
}
|
||||
else {
|
||||
state = fsm_b
|
||||
@@ -202,12 +203,13 @@ fn parser(s string) (int,PrepNumber) {
|
||||
fsm_b {
|
||||
state = fsm_c
|
||||
if c == c_plus {
|
||||
c = s[i++]
|
||||
//i++
|
||||
c = s[i]
|
||||
i++
|
||||
}
|
||||
else if c == c_minus {
|
||||
pn.negative = true
|
||||
c = s[i++]
|
||||
c = s[i]
|
||||
i++
|
||||
}
|
||||
else if is_digit(c) {
|
||||
}
|
||||
|
@@ -203,7 +203,7 @@ pub fn f64_to_str_lnd(f f64, dec_digit int) string {
|
||||
|
||||
*/
|
||||
pub struct BF_param {
|
||||
pad_ch byte = ` ` // padding char
|
||||
pad_ch byte = byte(` `) // padding char
|
||||
len0 int = -1 // default len for whole the number or string
|
||||
len1 int = 6 // number of decimal digits, if needed
|
||||
positive bool = true // mandatory: the sign of the number passed
|
||||
@@ -438,7 +438,7 @@ pub fn v_sprintf(str string, pt ... voidptr) string{
|
||||
mut len0 := -1 // forced length, if -1 free length
|
||||
mut len1 := -1 // decimal part for floats
|
||||
def_len1 := 6 // default value for len1
|
||||
mut pad_ch := ` ` // pad char
|
||||
mut pad_ch := byte(` `) // pad char
|
||||
mut th_separator := false // thousands separator flag
|
||||
|
||||
// prefix chars for Length field
|
||||
|
Reference in New Issue
Block a user