Create a span that covers the current character.
(&self)
| 632 | |
| 633 | /// Create a span that covers the current character. |
| 634 | fn span_char(&self) -> Span { |
| 635 | let mut next = Position { |
| 636 | offset: self.offset().checked_add(self.char().len_utf8()).unwrap(), |
| 637 | line: self.line(), |
| 638 | column: self.column().checked_add(1).unwrap(), |
| 639 | }; |
| 640 | if self.char() == '\n' { |
| 641 | next.line += 1; |
| 642 | next.column = 1; |
| 643 | } |
| 644 | Span::new(self.pos(), next) |
| 645 | } |
| 646 | |
| 647 | /// Parse and push a single alternation on to the parser's internal stack. |
| 648 | /// If the top of the stack already has an alternation, then add to that |
no test coverage detected