func (p *Parser) readWord() (string, error) {
	p.skipWhiteSpace()

	var word []rune
	var ch rune
	for {
		if p.done() {
			break
		}

		ch = p.current()
		if isWhitespace(ch) ||
			ch == Comma ||
			isOperatorSymbol(ch) {
			break
		}

		word = append(word, ch)
		p.advance()
	}

	if len(word) == 0 {
		return "", p.parseError(errExpectedNonEmptyKey)
	}

	return string(word), nil
}
// readWord skips whitespace, then reads a word until whitespace or a token.
// it will leave the cursor on the next char after the word, i.e. the space or token.
readWord skips whitespace, then reads a word until whitespace or a token.
it will leave the cursor on the next char after the word, i.e. the space or token.
// readWord skips whitespace then reads a word until whitespace or a token . // it will leave the cursor on the next char after the word i . e . the space or token .
func (p *Parser) readWord() (string, error) {
	p.skipWhiteSpace()
	var word []rune
	var ch rune
	for {
		if p.done() {
			break
		}
		ch = p.current()
		if isWhitespace(ch) ||
			ch == Comma ||
			isOperatorSymbol(ch) {
			break
		}
		word = append(word, ch)
		p.advance()
	}
	if len(word) == 0 {
		return "", p.parseError(errExpectedNonEmptyKey)
	}
	return string(word), nil
}
func ( p * Parser ) readWord ( ) ( string , error ) { p . skipWhiteSpace ( ) var word [ ] rune var ch rune for { if p . done ( ) { break } ch = p . current ( ) if isWhitespace ( ch ) || ch == Comma || isOperatorSymbol ( ch ) { break } word = append ( word , ch ) p . advance ( ) } if len ( word ) == 0 { return " " , p . parseError ( errExpectedNonEmptyKey ) } return string ( word ) , nil }
readWord skips whitespace, then reads a word until whitespace or a token.
readWord skips whitespace then reads a word until whitespace or a token .