Skip to content

Finish flattened content helpers render step#279

Merged
Bergmann89 merged 16 commits into
masterfrom
copilot/finish-pull-request-273
Jun 22, 2026
Merged

Finish flattened content helpers render step#279
Bergmann89 merged 16 commits into
masterfrom
copilot/finish-pull-request-273

Conversation

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This picks up the unfinished work from the abandoned flattened-content helper PR and carries it to a reviewable state. It adds the helper generation step, wires it into the public renderer config, and closes the remaining gaps in naming and generated output coverage.

  • What changes

    • Adds ContentHelpersRenderStep to generate accessor methods for flattened Vec<...Content> struct content.
    • Exposes the step through RenderStep so it can be enabled via normal renderer configuration.
    • Adds feature coverage for generated helpers, including keyword-derived element names.
  • Renderer integration

    • Registers the new step in renderer/config plumbing.
    • Exports the step from the renderer module tree.
    • Keeps the implementation scoped to flattened dynamic-list content backed by an inline enum.
  • Generated API

    • Emits read and mutable helper accessors for single-occurrence content variants.
    • Preserves valid Rust naming for keyword-derived identifiers when generating *_mut helpers.
impl FooType {
    pub fn bar(&self) -> Option<&String> { ... }
    pub fn bar_mut(&mut self) -> Option<&mut String> { ... }

    pub fn type_(&self) -> Option<&String> { ... }
    pub fn type_mut(&mut self) -> Option<&mut String> { ... }
}
  • Coverage
    • Adds a focused feature fixture for flattened content helpers.
    • Adds a regression case for keyword-based names such as type / match.

Closes #271

Copilot AI requested a review from Bergmann89 June 21, 2026 12:41
@Bergmann89 Bergmann89 marked this pull request as ready for review June 22, 2026 18:24
@Bergmann89 Bergmann89 merged commit a490156 into master Jun 22, 2026
2 checks passed
@Bergmann89 Bergmann89 deleted the copilot/finish-pull-request-273 branch June 22, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Large structures that are not flattened cause buffer overflow / convencience functions for flattened types.

3 participants