currentIs returns true iff the input's current rune (at index 0) is in runes.
(runes ...rune)
| 166 | |
| 167 | // currentIs returns true iff the input's current rune (at index 0) is in runes. |
| 168 | func (t *Tokenizer) currentIs(runes ...rune) bool { |
| 169 | for _, r := range runes { |
| 170 | if r == t.current() { |
| 171 | return true |
| 172 | } |
| 173 | } |
| 174 | return false |
| 175 | } |
| 176 | |
| 177 | // readWord reads a single word from the input. Returns when the next rune is |
| 178 | // any of: nil (-1), empty space, comma, single/double quote, backtick, |