-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement LocatedSpan::get_line_beginning(). (#66)
* Implement LocatedSpan::get_line(). Add a function to get the full input line containing the (start point of the) LocatedSpan. As suggested in #53. * Add some tests. * Remove bogus comment. * No need for get_line() to return Option. * The test that uses `format!` requires std. * Some rustfmt. * Refactor two similar unsafe blocks to one. * Add some disclaimer comments / docs. * Rename get_line to get_line_beginning. * Add line_begining_may_ot_be_entire_len test. This test documents how `get_line_beginning()` differs from a hypotetical `get_line()` method.
- Loading branch information
Showing
2 changed files
with
158 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters