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
Fixed the following issues raised in code review:
1. Added validation to reject increment/decrement on literal numbers
- Now correctly errors on expressions like `echo $(++2)`
- Operators can only be applied to variables or parenthesized expressions
2. Replaced .unwrap() calls with proper error handling
- Fixed unwrap() in unary_pre_arithmetic_expr (line 1738)
- Fixed unwrap() in unary_post_arithmetic_expr (line 1783)
- Used ok_or_else() with descriptive error messages
3. Fixed missing parse_variable_expansion function
- Restored function that was accidentally removed during merge
- Fixes compilation errors
4. Fixed stray conflict marker in types.rs
- Removed leftover "<<<<<<< HEAD" marker
All tests pass and manual testing confirms:
- Post-increment (a++) returns original value, updates variable
- Pre-increment (++a) returns new value, updates variable
- Invalid expressions like ++2 correctly produce errors
0 commit comments