mirror of
https://github.com/RustPython/Parser.git
synced 2025-09-03 09:07:54 +00:00
Let located
only for python located stuff
This commit is contained in:
parent
a3d9d8cb14
commit
1d366d52ab
7 changed files with 38 additions and 38 deletions
|
@ -203,12 +203,12 @@ pub type LexResult = Result<Spanned, LexicalError>;
|
|||
/// ```
|
||||
#[inline]
|
||||
pub fn lex(source: &str, mode: Mode) -> impl Iterator<Item = LexResult> + '_ {
|
||||
lex_located(source, mode, TextSize::default())
|
||||
lex_starts_at(source, mode, TextSize::default())
|
||||
}
|
||||
|
||||
/// Create a new lexer from a source string, starting at a given location.
|
||||
/// You probably want to use [`lex`] instead.
|
||||
pub fn lex_located(
|
||||
pub fn lex_starts_at(
|
||||
source: &str,
|
||||
mode: Mode,
|
||||
start_offset: TextSize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue