Root Swift package mirroring PureYAML's structure, rules, and verification gates. Includes the XML node model (Node, Element, Attribute, QualifiedName), a working emitter (Serializer) with escaping and pretty/compact options, and structural validation. The parser surface is stable; parse() raises notImplemented until the scanner lands, pinned by a test. - dependency-free, namespaced under PureXML - portability and style gates carried over (style, namespacing, forbidden patterns, swiftformat, swiftlint, linux, wasm, windows CI) - 11 tests passing
14 lines
454 B
Swift
14 lines
454 B
Swift
public extension PureXML.Stream {
|
|
/// One document from a parsed stream, carrying its zero-based stream index
|
|
/// so that validation can report which document an issue belongs to.
|
|
struct Document: Equatable, Hashable, Sendable {
|
|
public var index: Int
|
|
public var node: PureXML.Model.Node
|
|
|
|
public init(index: Int, node: PureXML.Model.Node) {
|
|
self.index = index
|
|
self.node = node
|
|
}
|
|
}
|
|
}
|