Skip to content

Support assignment expressions, yield from and starred targets - #80

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
feat/frontend-gaps
Sep 5, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
feat/frontend-gaps

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

First item of #71: the three syntax forms that rejected whole files on the large projects measured in #69.

  • Acceptance tests first (test: define assignment expressions, yield from and starred targets), implementation follows.
  • Assignment expressions. New HIR node NamedExpr; the scope analysis binds the target in the enclosing function, also from inside a comprehension as PEP 572 specifies; the CFG builder lays the walrus out as an assignment before the statement that reads it, and a while (line := f()): condition is recomputed every iteration like the other control-flow conditions.
  • yield from. Yield gains a delegate flag; the adapter builds it instead of failing; lowering is unchanged.
  • Starred assignment targets. A tuple target may hold Starred; lowering gives the starred target the slice the others leave and indexes the targets after it from the end; scopes, the CFG builder and the reassigned-parameter scan follow the starred value.
  • Two tests that encoded the old limits now use forms that stay unsupported (async comprehensions, exception groups); the usage guide lists the three forms.
  • Regression snapshots: healthchecks goes from 636 to 653 files analysed (2 566 to 2 746 functions) and yt-fts to 20/20 files; the 17 syntax-error notes are replaced by the findings of those files.

Part of #71.

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 5, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit cb4e943 into main Sep 5, 2026
10 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/frontend-gaps branch September 5, 2026 10:53
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.

1 participant