roc/docs
Richard Feldman 7d0a269fb7
Implement ? (question mark) operator for error propagation
The ? operator now desugars expr? to a match expression that unwraps Ok
values and early returns Err values:

  match expr {
      Ok($q_ok) => $q_ok,
      Err($q_err) => return Err($q_err),
  }

Implementation details:
- Canonicalize the inner expression
- Create synthetic identifiers for Ok/Err values ($q_ok, $q_err)
- Create applied_tag patterns for Ok and Err
- Build match branches with proper scope isolation
- Mark synthetic patterns as used to avoid unused variable warnings
- Create e_lookup_local, e_tag, and e_return expressions for branch bodies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:02:01 -05:00
..
BUG_FIX_PLAN.md Implement ? (question mark) operator for error propagation 2025-11-29 20:02:01 -05:00