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

pull/3596/head
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
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ fn (s mut Scanner) ident_oct_number() string {
fn (s mut Scanner) ident_dec_number() string {
start_pos := s.pos
// 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++
}
// e.g. 1..9