mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 23:20:05 +02:00
Fixed comment after value in object value signaled by Frederic Surleau.
This commit is contained in:
@@ -557,9 +557,15 @@ Reader::readArray( Token &tokenStart )
|
||||
return recoverFromError( tokenArrayEnd );
|
||||
|
||||
Token token;
|
||||
if ( !readToken( token )
|
||||
|| ( token.type_ != tokenArraySeparator &&
|
||||
token.type_ != tokenArrayEnd ) )
|
||||
// Accept Comment after last item in the array.
|
||||
ok = readToken( token );
|
||||
while ( token.type_ == tokenComment && ok )
|
||||
{
|
||||
ok = readToken( token );
|
||||
}
|
||||
bool badTokenType = ( token.type_ == tokenArraySeparator &&
|
||||
token.type_ == tokenArrayEnd );
|
||||
if ( !ok || badTokenType )
|
||||
{
|
||||
return addErrorAndRecover( "Missing ',' or ']' in array declaration",
|
||||
token,
|
||||
|
Reference in New Issue
Block a user