Scalar parser#37
Conversation
|
What do you think about this pr @chyh1990 ? |
|
The API enhancement looks good for me. One little problem, maybe we should move |
| impl<'a> yaml::YamlScalarParser for IncludeParser<'a> { | ||
| fn parse_scalar(&self, tag: &scanner::TokenType, value: &str) -> Option<yaml::Yaml> { | ||
| if let scanner::TokenType::Tag(ref handle, ref suffix) = *tag { | ||
| if *handle == "!" && *suffix == "include" { |
There was a problem hiding this comment.
This line implies that the model for tag parsing implemented here differs from the YAML spec. A tag handle is nothing more but a shorthand to a URI prefix. The primary tag handle ! defaults to the URI prefix ! but may be redefined by a %TAG directive, so if a tag !include occurs somewhere in the source, it may resolve to the URI !include, but also to my.fancy.uri.prefix:include. Example:
%YAML 1.2
%TAG ! my.fancy.uri.prefix:
---
!include fooFor a parser to be spec-compliant, one needs to resolve all tags to URIs and then compare those URIs against whatever is expected.
There was a problem hiding this comment.
Thanks I don't know this feature of Yaml 1.2 spec
|
@chyh1990 How do you want to move dump_node as helper ? |
|
@chyh1990 the build is breaked https://travis-ci.org/chyh1990/yaml-rust/jobs/176486614 |
|
@chyh1990 any news about the build system ? |
|
@DeltaEvo you can try rebasing your pr, master passes CI now. |
|
@chyh1990 I think I'm unlucky |
|
@DeltaEvo Seems |
807435a to
5f2d7e4
Compare
|
@chyh1990 The issue on clippy is fixed and I rebased my Pull Request |
|
merge failed ? |
|
I rebased this branch in a separate PR: #135 |
|
Given that #135 replaces this PR, should this PR be closed? |
I am not involved in this crate, since it is no longer used by serde_yaml. |
|
FWIW I've merged #135 (a rebased version of #37 (this PR)) into my fork: https://github.com/davvid/yaml-rust |
Fix #35