protected void parseAttributes ( ) { burnWhitespaces ( ) ; attribute = null ; while ( reader . hasNextCharacter ( ) ) { char character = reader . peekCharacter ( ) ; if ( Strings . isNewLine ( character ) && ( attribute != null || Strings . isNotEmpty ( builder ) ) ) { throwException ( "Expecting line end marker: '" + lineEnd + "'." ) ; } character = next ( ) ; if ( Strings . isNewLine ( character ) && ( attribute != null || Strings . isNotEmpty ( builder ) ) ) { // Needs double check, possible comment along the way. throwException ( "Expecting line end marker: '" + lineEnd + "'." ) ; } else if ( character == blockClosing ) { if ( attribute != null || Strings . isNotEmpty ( builder ) ) { throwException ( "Unexpected tag close." ) ; } return ; } else if ( Strings . isWhitespace ( character ) && attribute == null ) { continue ; } else if ( character == separator && attribute == null ) { addAttributeName ( ) ; continue ; } else if ( character == lineEnd ) { if ( attribute == null ) { throwException ( "Found unexpected line end marker: '" + lineEnd + "'. Is separator (" + separator + ") missing?" ) ; } addAttribute ( ) ; } else { builder . append ( character ) ; } } }
Parses attributes block .