Address comments

This commit is contained in:
harupy 2023-01-05 18:24:54 +09:00
parent 9efa872023
commit 7f552e4594
3 changed files with 35 additions and 15 deletions

View file

@ -26,7 +26,7 @@ impl<'a> StringParser<'a> {
str_start: Location,
str_end: Location,
) -> Self {
let offset = kind.to_string().len() + if triple_quoted { 3 } else { 1 };
let offset = kind.prefix_len() + if triple_quoted { 3 } else { 1 };
Self {
chars: source.chars().peekable(),
kind,