mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Tags, anchors, and aliases are all parsed now.
This commit is contained in:
parent
8180a85a3b
commit
4c5a488f68
19 changed files with 303 additions and 93 deletions
25
parserstate.cpp
Normal file
25
parserstate.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "parserstate.h"
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
void ParserState::Reset()
|
||||
{
|
||||
// version
|
||||
version.major = 1;
|
||||
version.minor = 1;
|
||||
|
||||
// and tags
|
||||
tags.clear();
|
||||
tags["!"] = "!";
|
||||
tags["!!"] = "tag:yaml.org,2002:";
|
||||
}
|
||||
|
||||
std::string ParserState::TranslateTag(const std::string& handle) const
|
||||
{
|
||||
std::map <std::string, std::string>::const_iterator it = tags.find(handle);
|
||||
if(it == tags.end())
|
||||
return handle;
|
||||
|
||||
return it->second;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue