Skip to content

Commit 3ada81d

Browse files
committed
fix(codegen): add end sourcemaps for arguments
1 parent c3b7fd3 commit 3ada81d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/oxc_codegen/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ impl<'a> Codegen<'a> {
648648
self.print_list(arguments, ctx);
649649
}
650650
self.print_ascii_byte(b')');
651+
self.add_source_mapping_end(span);
651652
}
652653

653654
fn print_list_with_comments(&mut self, items: &[Argument<'_>], ctx: Context) {

crates/oxc_codegen/tests/integration/snapshots/stacktrace_is_correct.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ obj.fn()();
114114

115115
Error
116116
at fn2 (/project/input.js:5:19)
117-
at <anonymous> (/project/input.js:9:5)
117+
at <anonymous> (/project/input.js:9:9)
118118

119119
------------------------------------------------------
120120
## Input
@@ -146,7 +146,7 @@ obj.fn([1])();
146146

147147
Error
148148
at <anonymous> (/project/input.js:5:19)
149-
at <anonymous> (/project/input.js:9:11)
149+
at <anonymous> (/project/input.js:9:12)
150150

151151
------------------------------------------------------
152152
## Input
@@ -180,7 +180,7 @@ obj.fn({ a })();
180180

181181
Error
182182
at <anonymous> (/project/input.js:6:19)
183-
at <anonymous> (/project/input.js:10:11)
183+
at <anonymous> (/project/input.js:10:12)
184184

185185
------------------------------------------------------
186186
## Input

0 commit comments

Comments
 (0)