From 51d33d4a057a4f36e1194113d96e9792f65e33bc Mon Sep 17 00:00:00 2001 From: majj Date: Sat, 18 Aug 2018 10:43:52 +0800 Subject: [PATCH] experimental: notnil --- yaml/dom.nim | 4 +++- yaml/stream.nim | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/yaml/dom.nim b/yaml/dom.nim index 454f508..19d7a57 100644 --- a/yaml/dom.nim +++ b/yaml/dom.nim @@ -22,7 +22,9 @@ import tables, streams, hashes, sets, strutils import stream, taglib, serialization, private/internal, parser, presenter - + +when defined(nimNoNil): + {.experimental: "notnil".} type YamlNodeKind* = enum yScalar, yMapping, ySequence diff --git a/yaml/stream.nim b/yaml/stream.nim index e4ceb4c..b107a65 100644 --- a/yaml/stream.nim +++ b/yaml/stream.nim @@ -1,4 +1,4 @@ -# NimYAML - YAML implementation in Nim + # NimYAML - YAML implementation in Nim # (c) Copyright 2016 Felix Krause # # See the file "copying.txt", included in this @@ -15,6 +15,9 @@ import hashes import private/internal, taglib +when defined(nimNoNil): + {.experimental: "notnil".} + when defined(yamlScalarRepInd): type ScalarRepresentationIndicator* = enum srPlain, srSingleQuoted, srDoubleQuoted, srLiteral, srFolded