()
| 96 | } |
| 97 | |
| 98 | func (l *Lexer) backup() { |
| 99 | if l.eof { |
| 100 | l.eof = false |
| 101 | } else if l.end.rune > 0 { |
| 102 | _, sz := utf8.DecodeLastRuneInString(l.source.String()[:l.end.byte]) |
| 103 | l.end.byte -= sz |
| 104 | l.end.rune-- |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func (l *Lexer) emit(t Kind) { |
| 109 | l.emitValue(t, l.word()) |