mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-27 11:21:02 +08:00
[1587188]Fixed parsing of comment at tail of object.
This commit is contained in:
parent
3ffbf208a0
commit
fe536c0631
@ -395,12 +395,17 @@ Reader::readObject( Token &tokenStart )
|
|||||||
Token comma;
|
Token comma;
|
||||||
if ( !readToken( comma )
|
if ( !readToken( comma )
|
||||||
|| ( comma.type_ != tokenObjectEnd &&
|
|| ( comma.type_ != tokenObjectEnd &&
|
||||||
comma.type_ != tokenArraySeparator ) )
|
comma.type_ != tokenArraySeparator &&
|
||||||
|
comma.type_ != tokenComment ) )
|
||||||
{
|
{
|
||||||
return addErrorAndRecover( "Missing ',' or '}' in object declaration",
|
return addErrorAndRecover( "Missing ',' or '}' in object declaration",
|
||||||
comma,
|
comma,
|
||||||
tokenObjectEnd );
|
tokenObjectEnd );
|
||||||
}
|
}
|
||||||
|
bool finalizeTokenOk = true;
|
||||||
|
while ( comma.type_ == tokenComment &&
|
||||||
|
finalizeTokenOk )
|
||||||
|
finalizeTokenOk = readToken( comma );
|
||||||
if ( comma.type_ == tokenObjectEnd )
|
if ( comma.type_ == tokenObjectEnd )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user