Fixed bug with simple keys that are quoted scalars

This commit is contained in:
Jesse Beder
2009-07-25 18:58:41 +00:00
parent 946d3260d7
commit 2160bb2bcc
4 changed files with 260 additions and 224 deletions

View File

@@ -309,8 +309,8 @@ namespace YAML
{
std::string scalar;
// eat single or double quote
char quote = INPUT.get();
// peek at single or double quote (don't eat because we need to preserve (for the time being) the input position)
char quote = INPUT.peek();
bool single = (quote == '\'');
// setup the scanning parameters
@@ -330,6 +330,11 @@ namespace YAML
InsertSimpleKey();
int line = INPUT.line, column = INPUT.column;
// now eat that opening quote
INPUT.get();
// and scan
scalar = ScanScalar(INPUT, params);
m_simpleKeyAllowed = false;