Let located only for python located stuff

This commit is contained in:
Jeong YunWon 2023-05-10 03:17:56 +09:00
parent a3d9d8cb14
commit 1d366d52ab
7 changed files with 38 additions and 38 deletions

View file

@ -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,