Fixed complex keys.

This commit is contained in:
Jesse Beder 2008-06-28 17:32:10 +00:00
parent c63ebbd878
commit 01ef70a6f9
3 changed files with 11 additions and 103 deletions

View file

@ -204,7 +204,8 @@ namespace YAML
template <> PlainScalarToken *Scanner::ScanToken(PlainScalarToken *pToken)
{
// insert a potential simple key
InsertSimpleKey();
if(m_simpleKeyAllowed)
InsertSimpleKey();
m_simpleKeyAllowed = false;
// now eat and store the scalar
@ -279,7 +280,8 @@ namespace YAML
template <> QuotedScalarToken *Scanner::ScanToken(QuotedScalarToken *pToken)
{
// insert a potential simple key
InsertSimpleKey();
if(m_simpleKeyAllowed)
InsertSimpleKey();
m_simpleKeyAllowed = false;
// eat single or double quote