Replace the line-based --- heuristic with a scan over PureYAML's resumable token scanner, so a --- inside a quoted scalar can no longer misfire as a document boundary and directives stay attached to the document they introduce. Add a differential suite that checks the new scanner against the old line-based reference across generated streams and the full Geekbench corpus.
7 lines
195 B
Swift
7 lines
195 B
Swift
public extension PureYAMLStreaming {
|
|
/// Tokens emitted by the current streaming scanner milestone.
|
|
enum StreamingToken: Equatable, Sendable {
|
|
case documentSource(String)
|
|
}
|
|
}
|