mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-31 23:57:57 +00:00
Separate byteoffset ast and located ast
This commit is contained in:
parent
f47dfca4e3
commit
a14e43e03a
21 changed files with 893 additions and 562 deletions
|
@ -211,9 +211,9 @@ pub fn lex(source: &str, mode: Mode) -> impl Iterator<Item = LexResult> + '_ {
|
|||
pub fn lex_located(
|
||||
source: &str,
|
||||
mode: Mode,
|
||||
start_location: TextSize,
|
||||
start_offset: TextSize,
|
||||
) -> impl Iterator<Item = LexResult> + '_ {
|
||||
SoftKeywordTransformer::new(Lexer::new(source.chars(), start_location), mode)
|
||||
SoftKeywordTransformer::new(Lexer::new(source.chars(), start_offset), mode)
|
||||
}
|
||||
|
||||
impl<T> Lexer<T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue