Skip to content

feat(opy): complete audited statement grammar surface - #146

Merged
Teakowa merged 2 commits into
mainfrom
codex/issue-141-opy-grammar
Aug 31, 2026
Merged

feat(opy): complete audited statement grammar surface#146
Teakowa merged 2 commits into
mainfrom
codex/issue-141-opy-grammar

Conversation

@e54-bot

@e54-bot e54-bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • complete the audited statement grammar for del, min=/max=, continue, goto, labels, and dynamic loc+ targets
  • retain the new source constructs as span-preserving CST/HIR nodes with structural validation and tooling/dump support
  • keep canonical WIR ownership explicit with source-attributed integration diagnostics for backend-unrepresented statements
  • update the OverPy support matrix and HIR v2 contract documentation

Verification

  • cargo fmt --all -- --check
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
  • cargo test --locked -p opy-rs --lib --tests
  • python3 -m unittest discover compatibility/tests
  • cargo build --locked -p opy-cli --features compatibility
  • python3 compatibility/run_native.py --binary target/debug/opy-cli --semantic-binary target/debug/opy-compat

Fixes #141

Add source HIR nodes and diagnostics for del, min/max assignments, continue, goto, and labels while keeping canonical WIR gaps explicit.

Fixes #141

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major — crates/opy-rs/src/parser.rs (parse_goto)

The pinned OverPy parser treats goto RULE_START as a distinct accepted form that maps to the rule-loop operation; this branch currently parses it as an ordinary label. That leaves #141's audited grammar surface incomplete and gives the source HIR the wrong meaning for a supported form. Handle RULE_START distinctly and add executable coverage for it; canonical WIR lowering can remain an explicit integration boundary.

Major — crates/opy-cli/tests/cli.rs:270

The two new syntax entries make the filtered category count 16, but this test still hard-codes 14, so the required Rust CI jobs fail and the downstream compatibility gates are skipped. Remove the fixed category-cardinality assertion and verify the filtering contract without pinning a dynamic feature count.

Keep OverPy's RULE_START form distinct from named labels in source HIR and make the support filter test follow its dynamic result.

Refs #141

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teakowa
Teakowa merged commit 3a5ffb6 into main Aug 31, 2026
5 checks passed
@Teakowa
Teakowa deleted the codex/issue-141-opy-grammar branch August 31, 2026 13:18
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.

Complete the OverPy lexical and grammar surface

2 participants