certik / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Add a way to emit non-verbatim tags #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
YAML::Emitter only supports verbatim tags.  For the sake of generality it
would be nice if, e.g. `out << YAML::TagByKind << "12"` would produce "---
! 12".

It would also be nice to be able to use `out << YAML::LocalTag("foo") <<
"12"` to produce "--- !foo 12".

I've started a branch (/branches/other-tags) for coding this functionality.

Original issue reported on code.google.com by rtweeks21 on 14 Mar 2010 at 4:33

GoogleCodeExporter commented 9 years ago

Original comment by rtweeks21 on 14 Mar 2010 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by rtweeks21 on 14 Mar 2010 at 4:36

GoogleCodeExporter commented 9 years ago
Cool! I started poking around a bit, and I switched the parser tests to throw 
when they 
fail instead of setting a global stream. The default tag tests fail - this is a 
"not-
implemented-yet" fail, right? (I browsed around and couldn't find anything that 
should 
make them pass, but let me know if I broke the tests by switching them to 
exceptions.)

Original comment by jbe...@gmail.com on 15 Mar 2010 at 4:01

GoogleCodeExporter commented 9 years ago
The broken tests are expected if you apply the branch to the trunk.  In the 
event-api
branch I made there are some minor changes to the way that tags are handled by 
the
parser.  To avoid merge conflicts between those two branches, I didn't try to
propagate the tag handling changes to the other-tags branch.

Original comment by rtweeks21 on 15 Mar 2010 at 5:04