peekRune returns the next rune that would be read by the scanner.
()
| 185 | |
| 186 | // peekRune returns the next rune that would be read by the scanner. |
| 187 | func (p *Parser) peekRune() rune { |
| 188 | r, _, _ := p.s.s.r.ReadRune() |
| 189 | if r != eof { |
| 190 | _ = p.s.s.r.UnreadRune() |
| 191 | } |
| 192 | |
| 193 | return r |
| 194 | } |
| 195 | |
| 196 | // parseOptionalTokenAndInt parses the specified token followed |
| 197 | // by an int, if it exists. |
no test coverage detected