Implemented adjacent key:value pairs when the key is JSON-like

This commit is contained in:
jbeder
2009-10-29 21:05:48 +00:00
parent 72dceba671
commit 011a608b5a
4 changed files with 31 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
namespace YAML
{
class Node;
class RegEx;
class Scanner
{
@@ -78,6 +79,7 @@ namespace YAML
void ThrowParserException(const std::string& msg) const;
bool IsWhitespaceToBeEaten(char ch);
const RegEx& GetValueRegex() const;
struct SimpleKey {
SimpleKey(const Mark& mark_, int flowLevel_);
@@ -120,6 +122,7 @@ namespace YAML
// state info
bool m_startedStream, m_endedStream;
bool m_simpleKeyAllowed;
bool m_canBeJSONFlow;
std::stack <SimpleKey> m_simpleKeys;
std::stack <IndentMarker *> m_indents;
std::vector <IndentMarker *> m_indentRefs; // for "garbage collection"