Make Parser::num_bump_calls
0-indexed.
Currently in `collect_tokens_trailing_token`, `start_pos` and `end_pos` are 1-indexed by `replace_ranges` is 0-indexed, which is really confusing. Making them both 0-indexed makes debugging much easier.
This commit is contained in:
parent
f9c7ca70cb
commit
ca6649516f
2 changed files with 11 additions and 6 deletions
|
@ -1522,7 +1522,7 @@ fn debug_lookahead() {
|
|||
},
|
||||
},
|
||||
tokens: [],
|
||||
approx_token_stream_pos: 1,
|
||||
approx_token_stream_pos: 0,
|
||||
..
|
||||
}"
|
||||
);
|
||||
|
@ -1566,7 +1566,7 @@ fn debug_lookahead() {
|
|||
Parenthesis,
|
||||
),
|
||||
],
|
||||
approx_token_stream_pos: 1,
|
||||
approx_token_stream_pos: 0,
|
||||
..
|
||||
}"
|
||||
);
|
||||
|
@ -1631,7 +1631,7 @@ fn debug_lookahead() {
|
|||
Semi,
|
||||
Eof,
|
||||
],
|
||||
approx_token_stream_pos: 1,
|
||||
approx_token_stream_pos: 0,
|
||||
..
|
||||
}"
|
||||
);
|
||||
|
@ -1663,7 +1663,7 @@ fn debug_lookahead() {
|
|||
No,
|
||||
),
|
||||
],
|
||||
approx_token_stream_pos: 9,
|
||||
approx_token_stream_pos: 8,
|
||||
..
|
||||
}"
|
||||
);
|
||||
|
@ -1701,7 +1701,7 @@ fn debug_lookahead() {
|
|||
No,
|
||||
),
|
||||
],
|
||||
approx_token_stream_pos: 9,
|
||||
approx_token_stream_pos: 8,
|
||||
..
|
||||
}"
|
||||
);
|
||||
|
@ -1728,7 +1728,7 @@ fn debug_lookahead() {
|
|||
tokens: [
|
||||
Eof,
|
||||
],
|
||||
approx_token_stream_pos: 15,
|
||||
approx_token_stream_pos: 14,
|
||||
..
|
||||
}"
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue