You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a breaking change that consolidates equality operations into the comparison rule,
eliminating grammar redundancy and simplifying the AST structure.
- Remove separate `equality` rule that handled `==` and `!=` operators
- Consolidate all equality operators into the `comparison` rule
- Update grammar: `comparison → addition ( ( ">" | "<" | ">=" | "<=" | "=" | "==" | "!=" | "in" | "contains" ) addition )?`
- Remove `{:equality, ...}` AST node type entirely
- Both `=` and `==` now create `{:comparison, :eq, ...}` nodes
- `!=` creates `{:comparison, :ne, ...}` nodes
- Remove `equality_op` type definition
- Remove 50+ lines of redundant equality parsing functions
- Remove equality visitor functions in both string and instructions visitors
- Update type annotations throughout codebase
- Simplify operator mapping functions
- Both `=` and `==` operators now parse to identical AST nodes
- Decompilation: both `=` and `==` now format as `=` for consistency
- Evaluation behavior unchanged (both operators work identically)
- Update all test expectations from `{:equality, ...}` to `{:comparison, ...}`
- Update string formatting tests to expect `=` output instead of `==`
- All 970 tests pass with consolidated grammar
- AST pattern matching on `{:equality, ...}` nodes will break
- `==` operator now decompiles as `=` instead of `==`
- Grammar rule `equality` no longer exists
- Eliminates parser grammar redundancy identified in previous analysis
- Reduces AST complexity and parsing code paths
- Maintains full functional compatibility for end users
- Simplifies future grammar maintenance
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments