Adds the necessary machinery to refer to anchors when parsing yaml
yaml --- Foo: &FB 'FooBar' Bar: *FB ...
This will be parsed as a dictionary containing {Foo: 'FooBar', Bar: 'FooBar'}
Paths
| Differential D128770
[yaml] Add support for Anchors and Aliases to yaml::Input Needs ReviewPublic Authored by njames93 on Jun 28 2022, 4:29 PM.
Details Summary Adds the necessary machinery to refer to anchors when parsing yaml yaml --- Foo: &FB 'FooBar' Bar: *FB ... This will be parsed as a dictionary containing {Foo: 'FooBar', Bar: 'FooBar'}
Diff Detail
Event TimelineComment Actions Thanks for looking at this. Does the Yaml I/O documentation need updating (see llvm/docs/YamlIO.rst)? Unfortunately, this area of code isn't really one I'm familiar enough with to review in detail, and I don't have time brush up on it sufficiently to be able to, so someone else will need to do the review. Comment Actions
I decided against updating the docs link to the YAML specification and this change is simply about bringing the YamlIO implementation more inline with the actual specification.
Revision Contents
Diff 441324 llvm/include/llvm/Support/YAMLTraits.h
llvm/lib/Support/YAMLParser.cpp
llvm/lib/Support/YAMLTraits.cpp
llvm/unittests/Support/YAMLIOTest.cpp
|