From 0b278e915858d8b8d336b9b3a55fc712c5d2cad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 1 Aug 2024 14:36:51 +0900 Subject: [PATCH] fix --- crates/swc_common/src/input.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/swc_common/src/input.rs b/crates/swc_common/src/input.rs index d42cccbd3e97..546eeec0ef9c 100644 --- a/crates/swc_common/src/input.rs +++ b/crates/swc_common/src/input.rs @@ -15,6 +15,7 @@ pub struct StringInput<'a> { orig: &'a str, /// Original start position. orig_start: BytePos, + orig_end: BytePos, } impl<'a> StringInput<'a> { @@ -34,6 +35,7 @@ impl<'a> StringInput<'a> { orig: src, iter: src.chars(), orig_start: start, + orig_end: end, } } @@ -55,7 +57,7 @@ impl<'a> StringInput<'a> { } pub fn end_pos(&self) -> BytePos { - self.last_pos + self.orig_end } }