()
| 144 | } |
| 145 | |
| 146 | func (l *Lexer) readByte() (byte, error) { |
| 147 | if err := l.check(1); err != nil { |
| 148 | return 0, err |
| 149 | } |
| 150 | b := l.cursor[0] |
| 151 | l.cursor = l.cursor[1:] |
| 152 | if b == '\n' { |
| 153 | l.line++ |
| 154 | } |
| 155 | return b, nil |
| 156 | } |
| 157 | |
| 158 | func (l *Lexer) peekRune() (rune, int, error) { |
| 159 | if !utf8.FullRune(l.cursor) { |
no test coverage detected