mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
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:
parent
4ed7f62431
commit
bcbca461de
11 changed files with 247 additions and 9 deletions
12
node.cpp
12
node.cpp
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue