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

Loop:
	for {
		switch ch := x.next(); {
		case isClobShortText(ch):
		case ch == '\\':
			switch r := x.next(); {
			case r == eof:
				return x.error("unterminated short clob")
			case !isEscapeAble(r):
				return x.errorf("invalid character after escape: %#U", r)
			case r == '\r':
				// check for CR LF
				if x.peek() == '\n' {
					x.next()
				}
			case r == 'x' || r == 'X':
				// If what is being escaped is a hex character, then we still
				// need to make sure that escaped character is allowed.
				if !bytes.ContainsRune([]byte(hexDigits), x.next()) || !bytes.ContainsRune([]byte(hexDigits), x.next()) {
					x.backup()
					return x.errorf("invalid character as part of hex escape: %#U", x.peek())
				}
			case r == 'u' || r == 'U':
				return x.error("unicode escape is not valid in clob")
			}
		case isEndOfLine(ch) || ch == eof:
			return x.error("unterminated short clob")
		case ch == '"':
			x.backup()
			break Loop
		default:
			return x.errorf("invalid rune as part of short clob string: %#U", ch)
		}
	}

	x.emit(IonClobShort)
	// Ignore the closing quote.
	x.next()
	x.ignore()

	eatWhitespace(x)
	if ch := x.next(); ch != '}' {
		return x.errorf("invalid end to short clob, expected } but found: %#U", ch)
	}
	if ch := x.next(); ch != '}' {
		return x.errorf("invalid end to short clob, expected second } but found: %#U", ch)
	}

	x.emit(IonBinaryEnd)
	return lexValue
}
// lexClobShort consumes Clob text between double-quotes, similar to a String but is
// limited in what characters are legal.
lexClobShort consumes Clob text between double-quotes, similar to a String but is
limited in what characters are legal.
// lexClobShort consumes Clob text between double - quotes similar to a String but is // limited in what characters are legal .
func lexClobShort(x *Lexer) stateFn {
	x.ignore()
Loop:
	for {
		switch ch := x.next(); {
		case isClobShortText(ch):
		case ch == '\\':
			switch r := x.next(); {
			case r == eof:
				return x.error("unterminated short clob")
			case !isEscapeAble(r):
				return x.errorf("invalid character after escape: %#U", r)
			case r == '\r':
				if x.peek() == '\n' {
					x.next()
				}
			case r == 'x' || r == 'X':
				if !bytes.ContainsRune([]byte(hexDigits), x.next()) || !bytes.ContainsRune([]byte(hexDigits), x.next()) {
					x.backup()
					return x.errorf("invalid character as part of hex escape: %#U", x.peek())
				}
			case r == 'u' || r == 'U':
				return x.error("unicode escape is not valid in clob")
			}
		case isEndOfLine(ch) || ch == eof:
			return x.error("unterminated short clob")
		case ch == '"':
			x.backup()
			break Loop
		default:
			return x.errorf("invalid rune as part of short clob string: %#U", ch)
		}
	}
	x.emit(IonClobShort)
	x.next()
	x.ignore()
	eatWhitespace(x)
	if ch := x.next(); ch != '}' {
		return x.errorf("invalid end to short clob, expected } but found: %#U", ch)
	}
	if ch := x.next(); ch != '}' {
		return x.errorf("invalid end to short clob, expected second } but found: %#U", ch)
	}
	x.emit(IonBinaryEnd)
	return lexValue
}
func lexClobShort ( x * Lexer ) stateFn { x . ignore ( ) Loop : for { switch ch := x . next ( ) ; { case isClobShortText ( ch ) : case ch == '\\' : switch r := x . next ( ) ; { case r == eof : return x . error ( " " ) case ! isEscapeAble ( r ) : return x . errorf ( " " , r ) case r == '\r' : if x . peek ( ) == '\n' { x . next ( ) } case r == 'x' || r == 'X' : if ! bytes . ContainsRune ( [ ] byte ( hexDigits ) , x . next ( ) ) || ! bytes . ContainsRune ( [ ] byte ( hexDigits ) , x . next ( ) ) { x . backup ( ) return x . errorf ( " " , x . peek ( ) ) } case r == 'u' || r == 'U' : return x . error ( " " ) } case isEndOfLine ( ch ) || ch == eof : return x . error ( " " ) case ch == '"' : x . backup ( ) break Loop default : return x . errorf ( " " , ch ) } } x . emit ( IonClobShort ) x . next ( ) x . ignore ( ) eatWhitespace ( x ) if ch := x . next ( ) ; ch != '}' { return x . errorf ( " " , ch ) } if ch := x . next ( ) ; ch != '}' { return x . errorf ( " " , ch ) } x . emit ( IonBinaryEnd ) return lexValue }
lexClobShort consumes Clob text between double-quotes, similar to a String but is
limited in what characters are legal.
lexClobShort consumes Clob text between double - quotes similar to a String but is limited in what characters are legal .
// Ignore the opening quote. // check for CR LF // If what is being escaped is a hex character, then we still // need to make sure that escaped character is allowed. // Ignore the closing quote.