diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-04 20:24:27 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-04 20:24:27 -0400 |
commit | 7973da975eac7cf5155a140e4cb4f68d5cbb1eb9 (patch) | |
tree | 447a05d248c217b75b97c497d0a172204eeb8d7f /src/ext_depends/D-YAML/source/dyaml/emitter.d | |
parent | nix use overlays when convenient (diff) |
make set_depends (dyaml update)
Diffstat (limited to 'src/ext_depends/D-YAML/source/dyaml/emitter.d')
-rw-r--r-- | src/ext_depends/D-YAML/source/dyaml/emitter.d | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ext_depends/D-YAML/source/dyaml/emitter.d b/src/ext_depends/D-YAML/source/dyaml/emitter.d index 5cf6a92..5aafc0e 100644 --- a/src/ext_depends/D-YAML/source/dyaml/emitter.d +++ b/src/ext_depends/D-YAML/source/dyaml/emitter.d @@ -29,6 +29,7 @@ import dyaml.event; import dyaml.exception; import dyaml.linebreak; import dyaml.queue; +import dyaml.scanner; import dyaml.style; import dyaml.tagdirective; @@ -77,7 +78,7 @@ struct Emitter(Range, CharType) if (isOutputRange!(Range, CharType)) Range stream_; /// Type used for upcoming emitter steps - alias EmitterFunction = void function(typeof(this)*) @safe; + alias EmitterFunction = void function(scope typeof(this)*) @safe; ///Stack of states. Appender!(EmitterFunction[]) states_; @@ -732,14 +733,14 @@ struct Emitter(Range, CharType) if (isOutputRange!(Range, CharType)) //} auto writer = ScalarWriter!(Range, CharType)(&this, analysis_.scalar, context_ != Context.mappingSimpleKey); - with(writer) final switch(style_) + final switch(style_) { case ScalarStyle.invalid: assert(false); - case ScalarStyle.doubleQuoted: writeDoubleQuoted(); break; - case ScalarStyle.singleQuoted: writeSingleQuoted(); break; - case ScalarStyle.folded: writeFolded(); break; - case ScalarStyle.literal: writeLiteral(); break; - case ScalarStyle.plain: writePlain(); break; + case ScalarStyle.doubleQuoted: writer.writeDoubleQuoted(); break; + case ScalarStyle.singleQuoted: writer.writeSingleQuoted(); break; + case ScalarStyle.folded: writer.writeFolded(); break; + case ScalarStyle.literal: writer.writeLiteral(); break; + case ScalarStyle.plain: writer.writePlain(); break; } analysis_.flags.isNull = true; style_ = ScalarStyle.invalid; @@ -949,7 +950,7 @@ struct Emitter(Range, CharType) if (isOutputRange!(Range, CharType)) ///Prepare anchor for output. static string prepareAnchor(const string anchor) @safe in(anchor != "", "Anchor must not be empty") - in(anchor.all!(c => isAlphaNum(c) || c.among!('-', '_')), "Anchor contains invalid characters") + in(anchor.all!isNSAnchorName, "Anchor contains invalid characters") { return anchor; } |