extension PureYAML.Parsing { enum ScannerFlowContextKind { case sequence case mapping } struct ScannerFlowContext { var kind: ScannerFlowContextKind var isExpectingKey: Bool } /// A position that may be promoted to a flow-mapping key, mirroring libyaml's /// `yaml_simple_key_t`. When a `:` value indicator is later found, the scanner /// inserts a ``TokenKind/mappingKey`` token at ``tokenIndex`` so a node of any /// kind (plain or quoted scalar, or a nested `[...]`/`{...}` collection) that /// precedes the `:` becomes that pair's key. Only used inside flow collections; /// block context promotes keys with a forward lookahead instead. struct ScannerFlowSimpleKey { var tokenIndex: Int var mark: PureYAML.Parsing.Mark } }