func lexString(x *Lexer) stateFn {
	// Ignore the opening quote.
	x.ignore()

Loop:
	for {
		switch ch := x.next(); {
		case ch == '\\':
			if fn := handleEscapedRune(x); fn != nil {
				return fn
			}
		case isEndOfLine(ch) || ch == eof:
			return x.error("unterminated quoted string")
		case ch == '"':
			x.backup()
			break Loop
		case isStringPart(ch):
		// Yay, happy string character.
		default:
			return x.errorf("bad character as part of string: %#U", ch)
		}
	}

	x.emit(IonString)
	// Ignore the closing quote.
	x.next()
	x.ignore()
	return lexValue
}
// lexString scans a quoted string.
lexString scans a quoted string.
// lexString scans a quoted string .
func lexString(x *Lexer) stateFn {
	x.ignore()
Loop:
	for {
		switch ch := x.next(); {
		case ch == '\\':
			if fn := handleEscapedRune(x); fn != nil {
				return fn
			}
		case isEndOfLine(ch) || ch == eof:
			return x.error("unterminated quoted string")
		case ch == '"':
			x.backup()
			break Loop
		case isStringPart(ch):
		default:
			return x.errorf("bad character as part of string: %#U", ch)
		}
	}
	x.emit(IonString)
	x.next()
	x.ignore()
	return lexValue
}
func lexString ( x * Lexer ) stateFn { x . ignore ( ) Loop : for { switch ch := x . next ( ) ; { case ch == '\\' : if fn := handleEscapedRune ( x ) ; fn != nil { return fn } case isEndOfLine ( ch ) || ch == eof : return x . error ( " " ) case ch == '"' : x . backup ( ) break Loop case isStringPart ( ch ) : default : return x . errorf ( " " , ch ) } } x . emit ( IonString ) x . next ( ) x . ignore ( ) return lexValue }
lexString scans a quoted string.
lexString scans a quoted string .
// Ignore the opening quote. // Yay, happy string character. // Ignore the closing quote.