Separate byteoffset ast and located ast

This commit is contained in:
Jeong YunWon 2023-05-06 21:35:43 +09:00
parent f47dfca4e3
commit a14e43e03a
21 changed files with 893 additions and 562 deletions

View file

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