mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Fixed little bug in parser commit
This commit is contained in:
@@ -37,6 +37,9 @@ namespace YAML
|
|||||||
// . Throws a ParserException on error.
|
// . Throws a ParserException on error.
|
||||||
bool Parser::GetNextDocument(Node& document)
|
bool Parser::GetNextDocument(Node& document)
|
||||||
{
|
{
|
||||||
|
if(!m_pScanner.get())
|
||||||
|
return false;
|
||||||
|
|
||||||
// clear node
|
// clear node
|
||||||
document.Clear();
|
document.Clear();
|
||||||
|
|
||||||
@@ -130,6 +133,9 @@ namespace YAML
|
|||||||
|
|
||||||
void Parser::PrintTokens(std::ostream& out)
|
void Parser::PrintTokens(std::ostream& out)
|
||||||
{
|
{
|
||||||
|
if(!m_pScanner.get())
|
||||||
|
return;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
if(m_pScanner->empty())
|
if(m_pScanner->empty())
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user