Merged r366:387 from the jbeder-event-api branch

This commit is contained in:
Jesse Beder
2010-10-18 06:45:03 +00:00
parent 0a02403fb0
commit a71c03a18b
35 changed files with 1280 additions and 634 deletions

View File

@@ -1,6 +1,6 @@
#include "tag.h"
#include "directives.h"
#include "token.h"
#include "parserstate.h"
#include <cassert>
namespace YAML
@@ -28,17 +28,17 @@ namespace YAML
}
}
const std::string Tag::Translate(const ParserState& state)
const std::string Tag::Translate(const Directives& directives)
{
switch(type) {
case VERBATIM:
return value;
case PRIMARY_HANDLE:
return state.TranslateTagHandle("!") + value;
return directives.TranslateTagHandle("!") + value;
case SECONDARY_HANDLE:
return state.TranslateTagHandle("!!") + value;
return directives.TranslateTagHandle("!!") + value;
case NAMED_HANDLE:
return state.TranslateTagHandle("!" + handle + "!") + value;
return directives.TranslateTagHandle("!" + handle + "!") + value;
case NON_SPECIFIC:
// TODO:
return "!";