We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
swc-project
Learn more about funding links in repositories.
Report abuse
StringInput.end_pos
1 parent dd4b782 commit 5368e18Copy full SHA for 5368e18
.changeset/pink-pianos-allow.md
@@ -0,0 +1,5 @@
1
+---
2
+swc_common: patch
3
4
+
5
+fix(common): Fix `StringInput.end_pos`
crates/swc_common/src/input.rs
@@ -15,6 +15,7 @@ pub struct StringInput<'a> {
15
orig: &'a str,
16
/// Original start position.
17
orig_start: BytePos,
18
+ orig_end: BytePos,
19
}
20
21
impl<'a> StringInput<'a> {
@@ -34,6 +35,7 @@ impl<'a> StringInput<'a> {
34
35
orig: src,
36
iter: src.chars(),
37
orig_start: start,
38
+ orig_end: end,
39
40
41
@@ -55,7 +57,7 @@ impl<'a> StringInput<'a> {
55
57
56
58
59
pub fn end_pos(&self) -> BytePos {
- self.last_pos
60
+ self.orig_end
61
62
63
0 commit comments