Skip to content

Commit f51700d

Browse files
committed
chore: Amend previous commit.
Curious no tests caught this.
1 parent 248edaf commit f51700d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parsing/tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl<'a> TokenFinder<'a> {
150150

151151
#[inline]
152152
fn get_first_token_before(&self, node: &dyn Spanned, is_match: impl Fn(&TokenAndSpan) -> bool) -> Option<&'a TokenAndSpan> {
153-
node.previous_tokens_fast(self.module).iter().find(|token_and_span| is_match(token_and_span))
153+
node.previous_tokens_fast(self.module).iter().rev().find(|token_and_span| is_match(token_and_span))
154154
}
155155

156156
#[inline]

0 commit comments

Comments
 (0)