func (x *Lexer) acceptRun(valid string, noRepeat string) int {
	inRepeat := false
	count := 0
	// Use peek so that we can still back up if the rune we fail on is EOF.
	for ch := x.peek(); strings.IndexRune(valid, ch) >= 0; ch = x.peek() {
		x.next()
		count++
		isRepeatRune := strings.IndexRune(noRepeat, ch) >= 0
		if isRepeatRune && inRepeat {
			break
		}
		inRepeat = isRepeatRune
	}
	return count
}
// acceptRun consumes as many runes as possible from the given set set of valid runes.
// Stops at either an unacceptable rune, EOF, or if any of the noRepeat runes are encountered
// twice consecutively.
acceptRun consumes as many runes as possible from the given set set of valid runes.
Stops at either an unacceptable rune, EOF, or if any of the noRepeat runes are encountered
twice consecutively.
// acceptRun consumes as many runes as possible from the given set set of valid runes . // Stops at either an unacceptable rune EOF or if any of the noRepeat runes are encountered // twice consecutively .
func (x *Lexer) acceptRun(valid string, noRepeat string) int {
	inRepeat := false
	count := 0
	for ch := x.peek(); strings.IndexRune(valid, ch) >= 0; ch = x.peek() {
		x.next()
		count++
		isRepeatRune := strings.IndexRune(noRepeat, ch) >= 0
		if isRepeatRune && inRepeat {
			break
		}
		inRepeat = isRepeatRune
	}
	return count
}
func ( x * Lexer ) acceptRun ( valid string , noRepeat string ) int { inRepeat := false count := 0 for ch := x . peek ( ) ; strings . IndexRune ( valid , ch ) >= 0 ; ch = x . peek ( ) { x . next ( ) count ++ isRepeatRune := strings . IndexRune ( noRepeat , ch ) >= 0 if isRepeatRune && inRepeat { break } inRepeat = isRepeatRune } return count }
acceptRun consumes as many runes as possible from the given set set of valid runes.
acceptRun consumes as many runes as possible from the given set set of valid runes .
// Use peek so that we can still back up if the rune we fail on is EOF.