Repository navigation
-
Builds on released Mojo 1.0. The pixi channel moved from
max-nightlytomaxand the dependency pin from>=1.0.0b3.dev…to
>=1.0,<2; CI installsmojo==1.0.0from PyPI instead of the nightly
index with--prerelease allow. The weekly drift check still runs
against the latest nightly, so the repo still reports when the language
moves under it. No source changes were needed. -
README test counts corrected: 104 → 159 (74 DOM, 62 pull-parser, 23
error-position). The 14-document byte-match anchor against CPython
xml.etreeand the 6,000-iteration fuzz both re-run clean. -
New
xml.errorsmodule (exported from the package):line_col(source, offset)maps a byte offset to a 1-based (line, column) pair — the column
is the 1-based BYTE offset within the line, no UTF-8 decoding — and
parse_error(msg, source, offset)builds anErrorreading
<msg> at line <L>, column <C>: '<snippet>', where the snippet is up to
~30 bytes of the offending line centered on the column,
whitespace-trimmed, with...where truncated, and never multi-line. -
Pull-parser errors now carry that position + snippet wherever a byte
offset exists at the raise site: every strict-mode error (previously a
bare(line L, column C)suffix with no snippet) and the structural
errors both modes raise — unterminated constructs / start tags /
attributes / attribute values, unquoted attribute values, malformed
start/end tags, and empty element names (previously no position at all). -
No mechanism change: parsers still
raise Error(...), no new error
types, and existingcontains=-style message checks keep matching.