Skip to content

Lock precedence and associativity with evaluation assertions - #23

Merged
barrybecker4 merged 2 commits into
masterfrom
cursor/precedence-assoc-eval-tests-aad4
Nov 8, 2026
Merged

barrybecker4 merged 2 commits into
masterfrom
cursor/precedence-assoc-eval-tests-aad4

Conversation

@barrybecker4

Copy link
Copy Markdown
Member

Precedence and associativity suites previously compared only TreeSerializer output. Unparenthesized binary chains serialize the same for both tree shapes, so a flipped association or mixed-precedence reduction could stay green.

These suites now also assert evaluated values (and left-nested BinOp shapes where values alone are ambiguous), while keeping the existing serialization checks. Documented left-associative ^ remains unchanged.

Fixes #13

Open in Web Open in Cursor 

cursoragent and others added 2 commits November 8, 2026 14:49
Serialization alone cannot distinguish left vs right association or
wrong precedence trees, so assert evaluated values and left-nested
BinOp shapes for the chain and precedence cases.

Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
Resolve ExtendedSuite import conflict by keeping BinOp/Const for
tree-shape assertions alongside master's ExprEvaluator additions.

Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
@barrybecker4
barrybecker4 merged commit dde7fcf into master Nov 8, 2026
1 check passed
@barrybecker4
barrybecker4 deleted the cursor/precedence-assoc-eval-tests-aad4 branch November 8, 2026 16:04
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.

Precedence and associativity tests only compare serialization, which is identical for both tree shapes

2 participants