Skip to content

Commit d57f543

Browse files
committed
refactor(parser): Push higher level content
1 parent 0138b82 commit d57f543

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/parser/src/lexed_str.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ impl<'a> LexedStr<'a> {
3838
let _p = tracing::info_span!("LexedStr::new").entered();
3939
let mut conv = Converter::new(edition, text);
4040
if let Some(shebang_len) = rustc_lexer::strip_shebang(text) {
41-
conv.res.push(SHEBANG, conv.offset);
42-
conv.offset = shebang_len;
41+
conv.push(SHEBANG, shebang_len, Vec::new());
4342
};
4443

4544
// Re-create the tokenizer from scratch every token because `GuardedStrPrefix` is one token in the lexer

0 commit comments

Comments
 (0)