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

parser: fix rewind_scanner_to_current_token_in_new_mode (#10495)

This commit is contained in:
Yuriy Zymlex
2021-06-23 03:17:36 +10:00
committed by GitHub
parent c43791b0f5
commit 6736817bba
2 changed files with 3 additions and 4 deletions

View File

@@ -3261,7 +3261,8 @@ fn (mut p Parser) rewind_scanner_to_current_token_in_new_mode() {
no_token := token.Token{}
p.prev_tok = no_token
p.tok = no_token
p.peek_tok = no_token
p.peek_tok = no_token // requires 2 calls p.next() or check p.tok.kind != token.Kind.unknown
p.next()
for {
p.next()
// eprintln('rewinding to ${p.tok.tidx:5} | goal: ${tidx:5}')