[1587188]Fixed parsing of comment at tail of object.

This commit is contained in:
Christopher Dunn 2007-03-23 05:04:38 +00:00
parent 3ffbf208a0
commit fe536c0631

View File

@ -395,12 +395,17 @@ Reader::readObject( Token &tokenStart )
Token comma;
if ( !readToken( comma )
|| ( comma.type_ != tokenObjectEnd &&
comma.type_ != tokenArraySeparator ) )
comma.type_ != tokenArraySeparator &&
comma.type_ != tokenComment ) )
{
return addErrorAndRecover( "Missing ',' or '}' in object declaration",
comma,
tokenObjectEnd );
}
bool finalizeTokenOk = true;
while ( comma.type_ == tokenComment &&
finalizeTokenOk )
finalizeTokenOk = readToken( comma );
if ( comma.type_ == tokenObjectEnd )
return true;
}