Oren Ben-Kiki (orenbk@...) wrote:
> Nice. Some nits:
> - You may want to move the "flow" format of simple collections closer to the
> top (next to the very first example).
Yeah, good idea. I think this could be accomplished by moving our types into
a types.yml test.
> - You have an example in Indicators in Strings' where ': ' is used inside
> unquoted scalars. That's invalid. It is ', ' that is valid in such top-level
> scalars and invalid in nested ones. See the productions.
How is this example (from the spec) parsed?:
A key: value pair in a sequence.
A second: key:value pair.
As seen in a long, tangle mapping example in the spec.
> - There are some YAML features uncovered (specifically, single vs. double
> quoting strings).
Yeah, we probably need to start a quoting test.
> - Speaking of which, single-quoting the regexps would save you many \
> - Speaking of which, why REGEXP instead of '='? This would allow you to
> simple: !ruby/regexp '\A"((?:[^"]|\")+)"'
> modified: !ruby/regexp
> =: '\A"((?:[^"]|\")+)"'
> modifiers: i
> Or you could just write:
> simple: !ruby/regexp '/\A"((?:[^"]|\")+)"/'
> modified: !ruby/regexp '/\A"((?:[^"]|\")+)"/i'
This is great. I had this same thought over the weekend. I got the syntax from
YAML.pm and I wanted to allow YAML.rb to accept Perl regexps. This change will
appear in the 0.35 release today.
Thanks, Oren. Totally appreciate the careful eye.