|
|
|
@ -739,7 +739,7 @@ void SpaceParser::SkipWhite()
|
|
|
|
|
{
|
|
|
|
|
if( parsing_space )
|
|
|
|
|
{
|
|
|
|
|
while( IsWhite(lastc) || lastc == '#' )
|
|
|
|
|
while( IsWhite(lastc) || (!char_was_escaped && lastc == '#') )
|
|
|
|
|
{
|
|
|
|
|
if( lastc == '#' )
|
|
|
|
|
SkipLine();
|
|
|
|
@ -808,7 +808,7 @@ void SpaceParser::ReadTokenUntilDelimiter(std::wstring & token, int delimiter1,
|
|
|
|
|
{
|
|
|
|
|
token.clear();
|
|
|
|
|
|
|
|
|
|
while( lastc != -1 && lastc != '\n' && lastc != '#' && lastc != delimiter1 && lastc != delimiter2 )
|
|
|
|
|
while( lastc != -1 && (char_was_escaped || (lastc != '\n' && lastc != '#' && lastc != delimiter1 && lastc != delimiter2)) )
|
|
|
|
|
{
|
|
|
|
|
token += static_cast<wchar_t>(lastc);
|
|
|
|
|
ReadChar();
|
|
|
|
@ -860,7 +860,7 @@ void SpaceParser::ReadSpaceFieldToken(std::wstring & token)
|
|
|
|
|
{
|
|
|
|
|
token.clear();
|
|
|
|
|
|
|
|
|
|
while( lastc != -1 && (char_was_escaped || (lastc != separator && lastc != 10 && lastc != space_start)) )
|
|
|
|
|
while( lastc != -1 && (char_was_escaped || (lastc != separator && lastc != 10 && lastc != space_start && lastc != '#' )) )
|
|
|
|
|
{
|
|
|
|
|
token += static_cast<wchar_t>(lastc);
|
|
|
|
|
ReadChar();
|
|
|
|
@ -915,7 +915,10 @@ void SpaceParser::ReadMultilineTokenQuoted(std::wstring & token)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* this method is used to read the field name (key) in an object
|
|
|
|
|
* or to read the space child name (used in Space format)
|
|
|
|
|
*/
|
|
|
|
|
void SpaceParser::ReadKey()
|
|
|
|
|
{
|
|
|
|
|
SkipWhite();
|
|
|
|
@ -1128,7 +1131,7 @@ int SpaceParser::ReadChar()
|
|
|
|
|
case 'b': lastc = 0x08; break;
|
|
|
|
|
case 'f': lastc = 0x0c; break;
|
|
|
|
|
case 'u': ReadUnicodeCodePoint(); break;
|
|
|
|
|
// in other cases we return the last character
|
|
|
|
|
// "in other cases we return the last character, so two \\ returns one \ "
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|