extension PureYAML.Parsing.LibYAML { /// Port of `yaml_simple_key_t`. A potential implicit ("simple") mapping key: /// a node that may turn out to be a key once a `:` is seen on the same line. /// `tokenNumber` records where its `KEY` token must be spliced into the queue. struct SimpleKey: Equatable { /// Whether a simple key is still possible at this flow level. var possible: Bool /// Whether a `:` is required (a key sitting exactly at the block indent). var required: Bool /// The absolute token number where the `KEY` token is inserted. var tokenNumber: Int /// The position the potential key started at. var mark: PureYAML.Parsing.Mark /// Whether this key is a JSON-style node (a quoted flow scalar). A `:` /// adjacent to such a key is a value indicator even without a following /// space, per the YAML flow "adjacent value" rule. var isJSON = false /// Whether a tab preceded this key in its indentation. A tab may be /// separation but never indentation, so promoting such a key to a block /// mapping key (a `:` follows) is an error. var tabbed = false /// The empty entry pushed for a new flow level (`{ 0, 0, 0, {0,0,0} }`). static var empty: Self { Self(possible: false, required: false, tokenNumber: 0, mark: .start) } } }