2 #include "directives.h"
9 Tag::Tag(const Token
& token
): type(static_cast<TYPE
>(token
.data
))
18 case SECONDARY_HANDLE
:
23 value
= token
.params
[0];
32 const std::string
Tag::Translate(const Directives
& directives
)
38 return directives
.TranslateTagHandle("!") + value
;
39 case SECONDARY_HANDLE
:
40 return directives
.TranslateTagHandle("!!") + value
;
42 return directives
.TranslateTagHandle("!" + handle
+ "!") + value
;
49 throw std::runtime_error("yaml-cpp: internal error, bad tag type");