You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa42133
Browse filesBrowse the repository at this point in the historyBrowse files
Adds a position-by-key map (Symbol.for("@metaobjectsdev/yamlPositionByKey"),
non-enumerable so JSON.stringify and Object.keys ignore it) to every
mapping object the YAML pipeline produces. The carrier rides along through
the Rule-1/2/4/5 desugar transforms — Rule-2's scalar lift inherits the
wrapper key's position on its synthesized `name` slot, Rule-4's `[]`
suffix keeps the position under the un-suffixed canonical key, Rule-5's
sigil-free attrs re-key the position under the `@`-prefixed canonical
name. Anchor aliases resolve to the target value (matches yaml.toJS()).
parser-yaml swaps from `yaml.parse()` to the position-preserving walker
(parseYamlWithPositions, in core/yaml-positions-walker.ts). The browser
bundle stays clean: walker lives next to parser-yaml.ts (server-only),
and the pure-types accessor module (core/yaml-positions.ts) carries no
`yaml` import — the browser-safety test still passes.
Resolves the FR5b spec's per-node-vs-per-error-site brainstorm by
implementing per-node (mirrors FR5a source-on-node). Resolves the
desugar-synthesized-node brainstorm by inheriting the wrapper key's
position on the synthesized `name` slot (Rule 2) and omitting position
on truly empty-body nodes (Rule 3).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments