mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Wrote some tests, but they don't work because it doesn't output maps in a canonical form.
This commit is contained in:
10
parser.cpp
10
parser.cpp
@@ -8,8 +8,7 @@ namespace YAML
|
||||
{
|
||||
Parser::Parser(std::istream& in): m_pScanner(0)
|
||||
{
|
||||
m_pScanner = new Scanner(in);
|
||||
m_state.Reset();
|
||||
Load(in);
|
||||
}
|
||||
|
||||
Parser::~Parser()
|
||||
@@ -22,6 +21,13 @@ namespace YAML
|
||||
return m_pScanner->PeekNextToken() != 0;
|
||||
}
|
||||
|
||||
void Parser::Load(std::istream& in)
|
||||
{
|
||||
delete m_pScanner;
|
||||
m_pScanner = new Scanner(in);
|
||||
m_state.Reset();
|
||||
}
|
||||
|
||||
// GetNextDocument
|
||||
// . Reads the next document in the queue (of tokens).
|
||||
// . Throws (ScannerException|ParserException)s on errors.
|
||||
|
Reference in New Issue
Block a user