         }
     }
 
+    /// Get or set the `Node.Scalar` value if this node is a `Node.scalar`.
     public var scalar: Scalar? {
         get {
             if case let .scalar(scalar) = self {


import Foundation

extension Node {
    public struct Scalar {
        public var string: String {
            didSet {
                tag = .implicit
            }
        }
        public var tag: Tag
        public var style: Style
        public var mark: Mark?

        public enum Style: UInt32 {
            /// Let the emitter choose the style.
            case any = 0

            case folded
        }

        /// Create a `Node.Scalar` using the specified parameters.
        ///
        /// - parameter string: The string to generate this scalar.
        /// - parameter tag:    This scalar's `Tag`.
        /// - parameter style:  The style to use when emitting this `Scalar`.
        /// - parameter mark:   This scalar's `Mark`.
        public init(_ string: String, _ tag: Tag = .implicit, _ style: Style = .any, _ mark: Mark? = nil) {
            self.string = string
            self.tag = tag
