mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
x.json2: change default number type to i64 (#6773)
This commit is contained in:
parent
ba366b126f
commit
b0053d8910
@ -62,7 +62,7 @@ fn (p Parser) emit_error(msg string) string {
|
||||
}
|
||||
column := util.imax(0, cur.pos - pp + cur.len - 1)
|
||||
line := cur.line_nr
|
||||
return '[jisoni] $msg ($line:$column)'
|
||||
return '[json] $msg ($line:$column)'
|
||||
}
|
||||
|
||||
fn new_parser(srce string, convert_type bool) Parser {
|
||||
@ -291,7 +291,7 @@ fn (mut p Parser) decode_number() ?Any {
|
||||
}
|
||||
|
||||
if tl.starts_with('.') {
|
||||
return error('lecimals must start with a digit followed by a dot.')
|
||||
return error('decimals must start with a digit followed by a dot.')
|
||||
}
|
||||
|
||||
if tl.ends_with('+') || tl.ends_with('-') {
|
||||
@ -318,7 +318,7 @@ fn (mut p Parser) decode_number() ?Any {
|
||||
return if is_fl {
|
||||
Any(tl.f64())
|
||||
} else {
|
||||
Any(tl.int())
|
||||
Any(tl.i64())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user