mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 15:16:47 +02:00
reinforce readToken function and add simple tests (#1012)
This commit is contained in:
@@ -1227,6 +1227,14 @@ bool OurReader::readToken(Token& token) {
|
||||
ok = features_.allowSpecialFloats_ && match("nfinity", 7);
|
||||
}
|
||||
break;
|
||||
case '+':
|
||||
if (readNumber(true)) {
|
||||
token.type_ = tokenNumber;
|
||||
} else {
|
||||
token.type_ = tokenPosInf;
|
||||
ok = features_.allowSpecialFloats_ && match("nfinity", 7);
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
token.type_ = tokenTrue;
|
||||
ok = match("rue", 3);
|
||||
|
Reference in New Issue
Block a user