Skip to content

Commit

Permalink
fix: wrong parsing for hex jump values
Browse files Browse the repository at this point in the history
  • Loading branch information
TommYDeeee committed Apr 10, 2024
1 parent c063359 commit 31e1cc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/syntax/ast/expr_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ impl ast::HexJump {
pub fn lhs(&self) -> SyntaxToken {
self.syntax()
.children_with_tokens()
.find(|e| !e.kind().is_trivia())
.filter(|e| !e.kind().is_trivia())
.nth(1)
.and_then(|e| e.into_token())
.unwrap()
}
Expand All @@ -107,7 +108,7 @@ impl ast::HexJump {
self.syntax()
.children_with_tokens()
.filter(|e| !e.kind().is_trivia())
.last()
.nth(3)
.and_then(|e| e.into_token())
.unwrap()
}
Expand Down

0 comments on commit 31e1cc7

Please sign in to comment.