Skip to content

Commit

Permalink
Add position method to Record to make &Position accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecheng authored and audy committed Dec 4, 2024
1 parent 7186377 commit 5d73e1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/parser/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ impl<'a> SequenceRecord<'a> {
self.position.line
}

/// Return the line/byte position of the start of the sequence
pub fn position(&self) -> &Position {
self.position
}

/// Which line ending is this record using?
pub fn line_ending(&self) -> LineEnding {
self.line_ending
Expand Down

0 comments on commit 5d73e1f

Please sign in to comment.