func lexSymbol(x *Lexer) stateFn {
	isNull := false
	for {
		switch ch := x.next(); {
		case isIdentifierSymbolPart(ch):
		case ch == '.' && string(x.input[x.itemStart:x.pos]) == "null.":
			// There is a special case where a dot is okay within an identifier symbol,
			// and that is when it is part of one of the null types.
			isNull = true
		case isIdentifierSymbolEnd(ch):
			x.backup()
			if isNull {
				x.emit(IonNull)
			} else {
				x.emit(IonSymbol)
			}
			return lexValue
		default:
			return x.errorf("bad character as part of symbol: %#U", ch)
		}
	}
}
// lexSymbol scans an annotation or symbol and returns lexValue.
lexSymbol scans an annotation or symbol and returns lexValue.
// lexSymbol scans an annotation or symbol and returns lexValue .
func lexSymbol(x *Lexer) stateFn {
	isNull := false
	for {
		switch ch := x.next(); {
		case isIdentifierSymbolPart(ch):
		case ch == '.' && string(x.input[x.itemStart:x.pos]) == "null.":
			isNull = true
		case isIdentifierSymbolEnd(ch):
			x.backup()
			if isNull {
				x.emit(IonNull)
			} else {
				x.emit(IonSymbol)
			}
			return lexValue
		default:
			return x.errorf("bad character as part of symbol: %#U", ch)
		}
	}
}
func lexSymbol ( x * Lexer ) stateFn { isNull := false for { switch ch := x . next ( ) ; { case isIdentifierSymbolPart ( ch ) : case ch == '.' && string ( x . input [ x . itemStart : x . pos ] ) == " " : isNull = true case isIdentifierSymbolEnd ( ch ) : x . backup ( ) if isNull { x . emit ( IonNull ) } else { x . emit ( IonSymbol ) } return lexValue default : return x . errorf ( " " , ch ) } } }
lexSymbol scans an annotation or symbol and returns lexValue.
lexSymbol scans an annotation or symbol and returns lexValue .
// There is a special case where a dot is okay within an identifier symbol, // and that is when it is part of one of the null types.