summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2013-11-14 00:59:59 +0000
committerNick Kledzik <kledzik@apple.com>2013-11-14 00:59:59 +0000
commit4e7c22a90b28828e4a28751b65ae24091f7df4ec (patch)
tree831df9922e1cdd3f1537c3f9df0fc557eabc5aac /docs
parent4bd0224887a8de1434186cad2f618c18dea06c0b (diff)
downloadexternal_llvm-4e7c22a90b28828e4a28751b65ae24091f7df4ec.zip
external_llvm-4e7c22a90b28828e4a28751b65ae24091f7df4ec.tar.gz
external_llvm-4e7c22a90b28828e4a28751b65ae24091f7df4ec.tar.bz2
Add simple support for tags in YAML I/O
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/YamlIO.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/YamlIO.rst b/docs/YamlIO.rst
index 79e07cd..3ecd03a 100644
--- a/docs/YamlIO.rst
+++ b/docs/YamlIO.rst
@@ -633,6 +633,20 @@ This works for both reading and writing. For example:
};
+Tags
+----
+
+The YAML syntax supports tags as a way to specify the type of a node before
+it is parsed. This allows dynamic types of nodes. But the YAML I/O model uses
+static typing, so there are limits to how you can use tags with the YAML I/O
+model. Recently, we added support to YAML I/O for checking/setting the optional
+tag on a map. Using this functionality it is even possbile to support differnt
+mappings, as long as they are convertable.
+
+To check a tag, inside your mapping() method you can use io.mapTag() to specify
+what the tag should be. This will also add that tag when writing yaml.
+
+
Sequence
========