             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


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

}

extension Node.Scalar: Comparable {
    /// :nodoc:
    public static func < (lhs: Node.Scalar, rhs: Node.Scalar) -> Bool {
        return lhs.string < rhs.string
    }
}

extension Node.Scalar: Equatable {
    /// :nodoc:
    public static func == (lhs: Node.Scalar, rhs: Node.Scalar) -> Bool {
        return lhs.string == rhs.string && lhs.resolvedTag == rhs.resolvedTag
    }
