Repository navigation
docs: document inherited-array composition - #105
Conversation
dakusui
left a comment
There was a problem hiding this comment.
Review feedback: four documentation issues found. Documentation generation, OpenSpec validation, unit tests, and all 186 autotests otherwise passed locally.
| @@ -0,0 +1,8 @@ | |||
| # Changelog | |||
|
|
|||
| ## v0.0.53 | |||
There was a problem hiding this comment.
This entry does not match the release history: $super was introduced by commit 621a74b in v0.0.50, not v0.0.53. PR #103 will become v0.0.53, and under the stated merge order this documentation PR first reaches main in v0.0.54. Please backfill the compatibility entry under the release that introduced it, or restructure the entries to match the actual tags.
| We are considering enhancing the syntax so that a child can explicitly *append*, *prepend*, or *merge* an array with the one inherited from its ancestors, instead of always replacing it. | ||
| This is a future consideration and not yet supported; see https://github.com/dakusui/jqplusplus/issues/74[issue #74] for the tracking discussion. | ||
| ==== | ||
| See the link:../reference/syntax-reference.html#array-composition[Syntax Reference] for the marker syntax and its constraints. |
There was a problem hiding this comment.
Asciidoctor generates the target section as id="_array_composition", while this link targets #array-composition, so it opens the page without navigating to the section. Please add an explicit stable anchor to the target section or link to #_array_composition.
|
|
||
| Markers use the reserved `$super` namespace only in direct array-element position. | ||
| An unrecognized spelling in that position, or more than one marker in the same array, is an error. | ||
| Use `raw:$super` when the literal string `$super` is required as an array element. |
There was a problem hiding this comment.
A literal $super* is also interpreted as a marker and must be written as raw:$super*. Please document that escape alongside raw:$super; otherwise the new marker has no documented literal-data form here.
|
|
||
| The result is `{ "m": ["a", "b", "z"] }`. | ||
|
|
||
| `$super*` keeps the elements before it as a literal prefix and pairs each element after it with the inherited element at the same index. |
There was a problem hiding this comment.
The implementation rejects object/atom, array/object, and all other cross-kind pairs, but this reference only describes successful same-kind cases. Please state explicitly that paired elements must have the same kind, with null counted as an atom, so the runtime error is documented.
0db1957 to
5f7cb22
Compare
5f7cb22 to
9bba565
Compare
Summary
Stacked on #103.
$superand$super*semantics and compatibilityv0.0.53changelog entryVerification
tools/bin/gendocopenspec validate --all --strictMerge after #103.