feat(notations): add document-view engine skeleton-file parser - #439
Merged
Merged
Conversation
Syntax-only first slice of the document-view engine: parseSkeleton()
turns a skeleton file's YAML header + {{ ... }} transclusion body into
an AST (inline references with bounded field traversal, each/where/
order-by selection, trace, view, the \{{ escape). Canon resolution,
reference-suspicion states, render profiles, and PDF output are
follow-on work.
Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com>
Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@transitrix/document-view-enginepackage whoseparseSkeleton()turns a skeleton file's YAML header +{{ ... }}transclusion body into a header object and body AST.{{# each TYPE where ... order by ... }}selection block,.fieldreferences scoped to aneachbody,trace,view, and the\{{escape. IDs are validated against the canonical grammar (IDS_AND_REFERENCES.md§1-2, including theCAPABILITYV/H exception).Zero runtime dependencies, following this repo's existing
packages/*convention (own hand-rolled parsing, no shared cross-package runtime import).Not included: the CI workflow file for this package (
.github/workflows/document-view-engine-test.yml) — pushing.github/workflows/**changes is currently blocked by a known token-scope limitation on this repo. The workflow file exists locally and needs to be added by whoever has the right token scope; until then, run the test manually (see Test plan).Test plan
node packages/document-view-engine/tests/test_parse_skeleton.mjs— all checks passnode scripts/check-notations.mjs— doc-lint clean.github/workflows/document-view-engine-test.ymlonce push access allows it