refactor(mir): Phase 139-P3-B - RoutingDecision を enum 対応 + レガシー削除

- RoutingDecision の missing_caps を Vec<CapabilityTag> に変更(型安全化)
- error_tags は to_tag() メソッドで自動生成
- 全 callsite を enum variant に修正
- capability_tags モジュール(文字列定数群)を完全削除
- 全テスト PASS(型安全性向上を確認)
- フォーマット適用
This commit is contained in:
nyash-codex
2025-12-16 07:02:14 +09:00
parent 146f14a019
commit e404746612
106 changed files with 1475 additions and 1017 deletions

View File

@ -49,16 +49,21 @@ fn is_if_sum_value_expr(expr: &ASTNode) -> bool {
match expr {
ASTNode::Variable { .. } | ASTNode::Literal { .. } => true,
ASTNode::BinaryOp {
operator, left, right, ..
} => matches!(
operator,
BinaryOperator::Add
| BinaryOperator::Subtract
| BinaryOperator::Multiply
| BinaryOperator::Divide
| BinaryOperator::Modulo
) && is_if_sum_value_expr(left.as_ref())
&& is_if_sum_value_expr(right.as_ref()),
left,
right,
..
} => {
matches!(
operator,
BinaryOperator::Add
| BinaryOperator::Subtract
| BinaryOperator::Multiply
| BinaryOperator::Divide
| BinaryOperator::Modulo
) && is_if_sum_value_expr(left.as_ref())
&& is_if_sum_value_expr(right.as_ref())
}
_ => false,
}
}