Beginning of first attempt to parse.

Will be completely wiped, I think, in favor of a Scanner (to tokens), then Parser mechanism.
This commit is contained in:
Jesse Beder 2008-06-26 06:49:50 +00:00
parent 4ed7f62431
commit bcbca461de
11 changed files with 247 additions and 9 deletions

View file

@ -1,5 +1,8 @@
#include "node.h"
#include "content.h"
#include "parser.h"
#include "scalar.h"
#include "sequence.h"
namespace YAML
{
@ -18,7 +21,14 @@ namespace YAML
m_pContent = 0;
}
void Node::Read(std::istream& in)
void Node::Read(Parser *pParser, const std::string& token)
{
Clear();
if(token == std::string("") + SeqToken) {
m_pContent = new Sequence(pParser);
} else {
m_pContent = new Scalar(token);
}
}
}