mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Unified line endings.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include "node.h"
|
||||
#include "scanner.h"
|
||||
#include "token.h"
|
||||
#include "exceptions.h"
|
||||
#include "exceptions.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace YAML
|
||||
|
14
src/node.cpp
14
src/node.cpp
@@ -148,13 +148,13 @@ namespace YAML
|
||||
{
|
||||
if(!m_pContent)
|
||||
return CT_NONE;
|
||||
|
||||
if(m_pContent->IsScalar())
|
||||
return CT_SCALAR;
|
||||
else if(m_pContent->IsSequence())
|
||||
return CT_SEQUENCE;
|
||||
else if(m_pContent->IsMap())
|
||||
return CT_MAP;
|
||||
|
||||
if(m_pContent->IsScalar())
|
||||
return CT_SCALAR;
|
||||
else if(m_pContent->IsSequence())
|
||||
return CT_SEQUENCE;
|
||||
else if(m_pContent->IsMap())
|
||||
return CT_MAP;
|
||||
|
||||
return CT_NONE;
|
||||
}
|
||||
|
@@ -121,7 +121,7 @@ namespace YAML
|
||||
}
|
||||
|
||||
void Parser::PrintTokens(std::ostream& out)
|
||||
{
|
||||
{
|
||||
while(1) {
|
||||
if(m_pScanner->empty())
|
||||
break;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "crt.h"
|
||||
#include "regex.h"
|
||||
#include "stream.h"
|
||||
#include "regex.h"
|
||||
#include "stream.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace YAML
|
||||
@@ -92,8 +92,8 @@ namespace YAML
|
||||
bool RegEx::Matches(std::istream& in) const
|
||||
{
|
||||
return Match(in) >= 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool RegEx::Matches(Stream& in) const
|
||||
{
|
||||
return Match(in) >= 0;
|
||||
@@ -113,12 +113,12 @@ namespace YAML
|
||||
return m_pOp->Match(str, *this);
|
||||
}
|
||||
|
||||
// Match
|
||||
// Match
|
||||
int RegEx::Match(Stream& in) const
|
||||
{
|
||||
{
|
||||
return Match(in.stream());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Match
|
||||
// . The stream version does the same thing as the string version;
|
||||
// REMEMBER that we only match from the start of the stream!
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "sequence.h"
|
||||
#include "node.h"
|
||||
#include "scanner.h"
|
||||
#include "token.h"
|
||||
#include "token.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace YAML
|
||||
|
@@ -1,24 +1,24 @@
|
||||
#include "crt.h"
|
||||
#include "stream.h"
|
||||
#include "stream.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
int Stream::pos() const
|
||||
{
|
||||
return input.tellg();
|
||||
}
|
||||
|
||||
char Stream::peek()
|
||||
{
|
||||
return input.peek();
|
||||
}
|
||||
|
||||
Stream::operator bool()
|
||||
{
|
||||
return input.good();
|
||||
int Stream::pos() const
|
||||
{
|
||||
return input.tellg();
|
||||
}
|
||||
|
||||
|
||||
char Stream::peek()
|
||||
{
|
||||
return input.peek();
|
||||
}
|
||||
|
||||
Stream::operator bool()
|
||||
{
|
||||
return input.good();
|
||||
}
|
||||
|
||||
// get
|
||||
// . Extracts a character from the stream and updates our position
|
||||
char Stream::get()
|
||||
@@ -48,6 +48,6 @@ namespace YAML
|
||||
{
|
||||
for(int i=0;i<n;i++)
|
||||
get();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user