PureXML/Sources/Parsing
Mihaela Mihaljevic 4659ea33c8 feat(editor): source spans on the tree, mapping findings to positions
Slice 1 of #94 (editor integration). The keystone: a located validation finding
can now be mapped back to a source range.

- TreeNode gains a sourceRange (start/end Mark); SourceRange is a half-open span.
- PureXML.readTree builds a mutable, parent-aware, best-effort tree whose every
  node carries its span (an element from the < of its start tag to past its end
  tag; leaves over the text they consumed). Never throws, recovers in place,
  returns located diagnostics.
- TreeNode.node(at:) navigates a validation coding path to its node using the
  same canonical convention the validators build paths with (a sibling index
  only when a name repeats), and sourceRange(at:) returns the span. So
  Document.validate's ValidationError.codingPath resolves to characters in the
  document.

Tests prove the spans, the navigation, the end-to-end bridge (an XSD finding to
a source range), and that ranged reading of invalid input never crashes.
2026-06-08 13:14:29 +02:00
..
ByteDecoder.swift
Diagnostic.swift feat(parsing): recovering reader that never crashes on invalid input 2026-06-08 12:15:18 +02:00
DoctypeScanner.swift feat(dtd): external and parameter entities, secure by default 2026-06-08 03:08:20 +02:00
DocumentType.swift feat(dtd): external and parameter entities, secure by default 2026-06-08 03:08:20 +02:00
EntityDecoder.swift
EntityResolver.swift feat(dtd): external and parameter entities, secure by default 2026-06-08 03:08:20 +02:00
Event.swift
EventReader.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
ExternalID.swift feat(dtd): external and parameter entities, secure by default 2026-06-08 03:08:20 +02:00
InputEncoding.swift
Limits.swift
Mark.swift
NamespaceContext.swift
ParseError.swift
Parser.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
PushAsync.swift feat(parsing): resumable push / feed streaming API 2026-06-08 07:21:22 +02:00
PushParser.swift feat(parsing): resumable push / feed streaming API 2026-06-08 07:21:22 +02:00
PushScanner.swift feat(parsing): resumable push / feed streaming API 2026-06-08 07:21:22 +02:00
Reader.swift
ReadResult.swift feat(parsing): recovering reader that never crashes on invalid input 2026-06-08 12:15:18 +02:00
SAXHandler.swift
SourceRange.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
StreamingDecoder.swift
TextReader.swift feat(parse): xmlTextReader pull cursor 2026-06-08 03:18:00 +02:00
XMLCharacter.swift