acceptUntil accepts runes until it hits a delimiter rune contained in the provided string
(delims string)
| 150 | // acceptUntil accepts runes until it hits a delimiter |
| 151 | // rune contained in the provided string |
| 152 | func (l *lexer) acceptUntil(delims string) { |
| 153 | for !strings.ContainsRune(delims, l.next()) { |
| 154 | if l.cur == utf8.RuneError { |
| 155 | return |
| 156 | } |
| 157 | } |
| 158 | l.backup() |
| 159 | } |
| 160 | |
| 161 | // acceptUntilUnescaped accepts runes until it hits a delimiter |
| 162 | // rune contained in the provided string, unless that rune was |