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

v2: fix bug in scanner, introduced in da9b639 (_ in num literals)

This commit is contained in:
joe-conigliaro 2020-01-23 21:47:13 +11:00 committed by GitHub
parent da9b6394e8
commit 543e8dc78a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ fn (s mut Scanner) ident_oct_number() string {
fn (s mut Scanner) ident_dec_number() string { fn (s mut Scanner) ident_dec_number() string {
start_pos := s.pos start_pos := s.pos
// scan integer part // scan integer part
for s.pos < s.text.len && (s.text[s.pos].is_digit() || s.text[s.pos] != num_sep) { for s.pos < s.text.len && (s.text[s.pos].is_digit() || s.text[s.pos] == num_sep) {
s.pos++ s.pos++
} }
// e.g. 1..9 // e.g. 1..9