scanner: minor optimization in `text_scan()` (#7172)
parent
14887304d8
commit
f377710c0b
|
@ -532,8 +532,9 @@ fn (mut s Scanner) text_scan() token.Token {
|
|||
// }
|
||||
if s.is_started {
|
||||
s.pos++
|
||||
} else {
|
||||
s.is_started = true
|
||||
}
|
||||
s.is_started = true
|
||||
if s.pos >= s.text.len {
|
||||
return s.end_of_file()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue