func emitSingleLongClob(x *Lexer) (bool, stateFn) {
	// eat any whitespace.
	eatWhitespace(x)

	// If the next character is the closing of a binary blob, then check it out
	// and consume it if it is.
	if x.peek() == '}' {
		x.next()
		if ch := x.peek(); ch != '}' {
			return false, x.errorf("expected a second } but found: %#U", ch)
		}
		// We can back up again since we know for a fact that the previous
		// character is the same width as the character we just peeked.
		x.backup()
		return false, nil
	}

	// Ensure that we have three single quotes to start the clob, then ignore them.
	if x.next() != '\'' || x.next() != '\'' || x.next() != '\'' {
		x.backup()
		return false, x.errorf("expected end of a Clob or start of a long string but found: %#U", x.next())
	}
	x.ignore()

	for {
		switch ch := x.next(); {
		case isClobLongText(ch):
		case ch == '\\':
			// Eat whatever is after the escape character unless it's an EOF.
			if r := x.next(); r == eof {
				return false, x.error("unterminated long clob")
			}
		case ch == eof:
			return false, x.error("unterminated long clob")
		case ch == '\'':
			count := 1
			for next := x.next(); next == '\''; next = x.next() {
				count++
			}
			// We have reached a character after the end of our long string, which is
			// three single quotes. Need to back up over both that character and the
			// three single quotes, emit the long string, then eat the single quotes.
			if count >= 3 {
				x.backup()
				x.emitAndIgnoreTripleQuoteEnd(IonClobLong)

				return true, nil
			}
		default:
			return false, x.errorf("invalid rune as part of long clob string: %#U", ch)
		}
	}

}
// emitSingleLongClob eats optional whitespace then expects either the end of a Clob
// or the opening of a long string.  If we encountered the end of a Clob, then false and a nil
// state function are returned.  We then read the Clob version of a long string and return
// true and a nil state function if through the end of the long string is read without issue.
// If there is an issue, then false and an error state function are returned.
emitSingleLongClob eats optional whitespace then expects either the end of a Clob
or the opening of a long string.  If we encountered the end of a Clob, then false and a nil
state function are returned.  We then read the Clob version of a long string and return
true and a nil state function if through the end of the long string is read without issue.
If there is an issue, then false and an error state function are returned.
// emitSingleLongClob eats optional whitespace then expects either the end of a Clob // or the opening of a long string . If we encountered the end of a Clob then false and a nil // state function are returned . We then read the Clob version of a long string and return // true and a nil state function if through the end of the long string is read without issue . // If there is an issue then false and an error state function are returned .
func emitSingleLongClob(x *Lexer) (bool, stateFn) {
	eatWhitespace(x)
	if x.peek() == '}' {
		x.next()
		if ch := x.peek(); ch != '}' {
			return false, x.errorf("expected a second } but found: %#U", ch)
		}
		x.backup()
		return false, nil
	}
	if x.next() != '\'' || x.next() != '\'' || x.next() != '\'' {
		x.backup()
		return false, x.errorf("expected end of a Clob or start of a long string but found: %#U", x.next())
	}
	x.ignore()
	for {
		switch ch := x.next(); {
		case isClobLongText(ch):
		case ch == '\\':
			if r := x.next(); r == eof {
				return false, x.error("unterminated long clob")
			}
		case ch == eof:
			return false, x.error("unterminated long clob")
		case ch == '\'':
			count := 1
			for next := x.next(); next == '\''; next = x.next() {
				count++
			}
			if count >= 3 {
				x.backup()
				x.emitAndIgnoreTripleQuoteEnd(IonClobLong)
				return true, nil
			}
		default:
			return false, x.errorf("invalid rune as part of long clob string: %#U", ch)
		}
	}
}
func emitSingleLongClob ( x * Lexer ) ( bool , stateFn ) { eatWhitespace ( x ) if x . peek ( ) == '}' { x . next ( ) if ch := x . peek ( ) ; ch != '}' { return false , x . errorf ( " " , ch ) } x . backup ( ) return false , nil } if x . next ( ) != '\'' || x . next ( ) != '\'' || x . next ( ) != '\'' { x . backup ( ) return false , x . errorf ( " " , x . next ( ) ) } x . ignore ( ) for { switch ch := x . next ( ) ; { case isClobLongText ( ch ) : case ch == '\\' : if r := x . next ( ) ; r == eof { return false , x . error ( " " ) } case ch == eof : return false , x . error ( " " ) case ch == '\'' : count := 1 for next := x . next ( ) ; next == '\'' ; next = x . next ( ) { count ++ } if count >= 3 { x . backup ( ) x . emitAndIgnoreTripleQuoteEnd ( IonClobLong ) return true , nil } default : return false , x . errorf ( " " , ch ) } } }
emitSingleLongClob eats optional whitespace then expects either the end of a Clob
or the opening of a long string.
emitSingleLongClob eats optional whitespace then expects either the end of a Clob or the opening of a long string .
// eat any whitespace. // If the next character is the closing of a binary blob, then check it out // and consume it if it is. // We can back up again since we know for a fact that the previous // character is the same width as the character we just peeked. // Ensure that we have three single quotes to start the clob, then ignore them. // Eat whatever is after the escape character unless it's an EOF. // We have reached a character after the end of our long string, which is // three single quotes. Need to back up over both that character and the // three single quotes, emit the long string, then eat the single quotes.