We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 248edaf commit f51700dCopy full SHA for f51700d
src/parsing/tokens.rs
@@ -150,7 +150,7 @@ impl<'a> TokenFinder<'a> {
150
151
#[inline]
152
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))
+ node.previous_tokens_fast(self.module).iter().rev().find(|token_and_span| is_match(token_and_span))
154
}
155
156
0 commit comments