Skip to content

Yeast: some fixes#21924

Draft
asgerf wants to merge 8 commits into
github:mainfrom
asgerf:asgerf/yeast-changes
Draft

Yeast: some fixes#21924
asgerf wants to merge 8 commits into
github:mainfrom
asgerf:asgerf/yeast-changes

Conversation

@asgerf
Copy link
Copy Markdown
Contributor

@asgerf asgerf commented Jun 1, 2026

Some fixes that came along with working on Swift mapping rules

asgerf and others added 8 commits June 1, 2026 14:04
When a {..expr} splice in an output template is empty (e.g. from an
optional capture that did not match), drop the field entirely rather
than emitting an empty named field. This lets a single rule with
optional captures replace what used to be two near-identical rules.

Also re-renders the corpus to drop the now-suppressed empty fields.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add FieldCardinality to Schema to track required/multiple per field,
populated from the ast_types.yml suffixes (bare = required single,
? = optional single, + = required multiple, * = optional multiple).

dump_ast_with_type_errors now emits:
  <-- ERROR: missing required field 'name'
for any node in the output AST whose declared schema requires a field
that is absent from the actual node.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@asgerf asgerf added the no-change-note-required This PR does not need a change note label Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant