Skip to content

Commit 68d2695

Browse files
authored
Merge pull request RustPython#4369 from harupy/fix-make_tokenizer_located
Fix `make_tokenizer_located`
2 parents 64a14ec + 70ce090 commit 68d2695

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/parser/src/lexer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pub type LexResult = Result<Spanned, LexicalError>;
154154

155155
#[inline]
156156
pub fn make_tokenizer(source: &str) -> impl Iterator<Item = LexResult> + '_ {
157-
make_tokenizer_located(source, Location::new(0, 0))
157+
make_tokenizer_located(source, Location::new(1, 0))
158158
}
159159

160160
pub fn make_tokenizer_located(
@@ -240,8 +240,6 @@ where
240240
if let Some('\u{feff}') = lxr.window[0] {
241241
lxr.window.slide();
242242
}
243-
// Start at top row (=1) left column (=1)
244-
lxr.location.reset();
245243
lxr
246244
}
247245

0 commit comments

Comments
 (0)