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:
parent
c43791b0f5
commit
6736817bba
@ -1,3 +1 @@
|
||||
cmd/tools/vdoc/tests/testdata/project1/main.v:0:1: error: unexpected unknown, expecting `const`
|
||||
1 | const (
|
||||
2 | source_root = 'temp'
|
||||
vdoc: No documentation found for /v/vmaster/cmd/tools/vdoc/tests/testdata/project1/main.v
|
||||
|
@ -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}')
|
||||
|
Loading…
Reference in New Issue
Block a user