parserstate.cpp 455 Bytes
Newer Older
1
2
3
4
#include "parserstate.h"

namespace YAML
{
5
	ParserState::ParserState()
6
7
	{
		// version
8
		version.isDefault = true;
9
10
11
12
		version.major = 1;
		version.minor = 2;
	}

13
	const std::string ParserState::TranslateTagHandle(const std::string& handle) const
14
15
	{
		std::map <std::string, std::string>::const_iterator it = tags.find(handle);
16
17
18
		if(it == tags.end()) {
			if(handle == "!!")
				return "tag:yaml.org,2002:";
19
			return handle;
20
		}
21
22
23
24

		return it->second;
	}
}