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:
@@ -1,3 +1 @@
|
|||||||
cmd/tools/vdoc/tests/testdata/project1/main.v:0:1: error: unexpected unknown, expecting `const`
|
vdoc: No documentation found for /v/vmaster/cmd/tools/vdoc/tests/testdata/project1/main.v
|
||||||
1 | const (
|
|
||||||
2 | source_root = 'temp'
|
|
||||||
|
@@ -3261,7 +3261,8 @@ fn (mut p Parser) rewind_scanner_to_current_token_in_new_mode() {
|
|||||||
no_token := token.Token{}
|
no_token := token.Token{}
|
||||||
p.prev_tok = no_token
|
p.prev_tok = no_token
|
||||||
p.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 {
|
for {
|
||||||
p.next()
|
p.next()
|
||||||
// eprintln('rewinding to ${p.tok.tidx:5} | goal: ${tidx:5}')
|
// eprintln('rewinding to ${p.tok.tidx:5} | goal: ${tidx:5}')
|
||||||
|
Reference in New Issue
Block a user