Skip to content

Commit

Permalink
Revert "Use lookup_token with filter"
Browse files Browse the repository at this point in the history
This reverts commit 87115e7.
  • Loading branch information
kdy1 committed Dec 2, 2022
1 parent e0ab2ad commit 5d5cdff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/swc_common/src/source_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,8 @@ impl SourceMap {

if let Some(orig) = &orig {
if let Some(token) = orig
.lookup_token(line, col)
.filter(|t| t.get_dst_line() == line)
.tokens()
.find(|token| token.get_src_line() == line - 1 && token.get_src_col() == col)
{
line = token.get_src_line() + 1;
col = token.get_src_col();
Expand Down

0 comments on commit 5d5cdff

Please sign in to comment.