Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
doc(span) Document AtEof implementation for Span.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Jan 9, 2018
1 parent 983a7ba commit 737e862
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,11 @@ impl<'a> InputLength for Span<'a> {
}
}

/// Implement `AtEof` from nom to be able to use the `Span` structure
/// as an input of the parsers.
///
/// This trait aims at determining whether the current span is at the
/// end of the input.
impl<'a> AtEof for Span<'a> {
fn at_eof(&self) -> bool {
self.slice.at_eof()
Expand Down

0 comments on commit 737e862

Please sign in to comment.