feat(joinir): detect mutable accumulator pattern (AST-only, spec minimal)
- Implement MutableAccumulatorAnalyzer in loop_pattern_detection/
- Detect shape: target = target + x (Add only, x ∈ {Var, Literal})
- Does NOT check read-only (delegated to ScopeManager)
- Multiple assignments → return None (not our pattern, let other code handle it)
- 6 unit tests covering OK/NG cases
- Error prefix: [joinir/mutable-acc-spec]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -746,4 +746,8 @@ pub mod binding_map_provider;
|
||||
|
||||
// Phase 100 P1-2: Pinned Local Analyzer
|
||||
pub mod pinned_local_analyzer;
|
||||
|
||||
// Phase 100 P2-1: Mutable Accumulator Analyzer
|
||||
pub mod mutable_accumulator_analyzer;
|
||||
|
||||
pub use binding_map_provider::BindingMapProvider;
|
||||
|
||||
Reference in New Issue
Block a user