func lexLongString(x *Lexer) stateFn {
	// Ignore the initial triple quote.
	x.ignore()

	count := 0

Loop:
	for {
		// Keep consuming single quotes until they stop.  If there was a run
		// of three or more then the string was ended and we can break the loop.
		switch ch := x.next(); {
		case ch == '\\':
			if fn := handleEscapedRune(x); fn != nil {
				return fn
			}
		case ch == eof:
			if count >= 3 {
				break Loop
			}
			return x.error("unterminated long string")
		case ch == '\'':
			count++
		case isLongStringPart(ch):
			if count >= 3 {
				x.backup()
				break Loop
			}
			count = 0
		default:
			if count >= 3 {
				x.backup()
				break Loop
			}
			return x.errorf("bad character as part of long string: %#U", ch)
		}
	}

	x.emitAndIgnoreTripleQuoteEnd(IonStringLong)
	return lexValue
}
// lexLongString scans a long string.  It is up to the parser to join multiple
// long strings together.
lexLongString scans a long string.  It is up to the parser to join multiple
long strings together.
// lexLongString scans a long string . It is up to the parser to join multiple // long strings together .
func lexLongString(x *Lexer) stateFn {
	x.ignore()
	count := 0
Loop:
	for {
		switch ch := x.next(); {
		case ch == '\\':
			if fn := handleEscapedRune(x); fn != nil {
				return fn
			}
		case ch == eof:
			if count >= 3 {
				break Loop
			}
			return x.error("unterminated long string")
		case ch == '\'':
			count++
		case isLongStringPart(ch):
			if count >= 3 {
				x.backup()
				break Loop
			}
			count = 0
		default:
			if count >= 3 {
				x.backup()
				break Loop
			}
			return x.errorf("bad character as part of long string: %#U", ch)
		}
	}
	x.emitAndIgnoreTripleQuoteEnd(IonStringLong)
	return lexValue
}
func lexLongString ( x * Lexer ) stateFn { x . ignore ( ) count := 0 Loop : for { switch ch := x . next ( ) ; { case ch == '\\' : if fn := handleEscapedRune ( x ) ; fn != nil { return fn } case ch == eof : if count >= 3 { break Loop } return x . error ( " " ) case ch == '\'' : count ++ case isLongStringPart ( ch ) : if count >= 3 { x . backup ( ) break Loop } count = 0 default : if count >= 3 { x . backup ( ) break Loop } return x . errorf ( " " , ch ) } } x . emitAndIgnoreTripleQuoteEnd ( IonStringLong ) return lexValue }
lexLongString scans a long string.
lexLongString scans a long string .
// Ignore the initial triple quote. // Keep consuming single quotes until they stop.  If there was a run // of three or more then the string was ended and we can break the loop.