refactor(joinir): Phase 89 リファクタリング - 2) ShapeCapability分類修正
変更内容: - 新規 capability 追加: P4ContinueEarlyReturn - Continue + Early Return 専用の capability - P4ContinueSkipWs と明確に分離 - PatternContinueReturnMinimal のマッピング修正 - P4ContinueSkipWs → P4ContinueEarlyReturn に変更 - is_p2_core_capability に P4ContinueEarlyReturn を追加 理由: - P4ContinueSkipWs は「Continue のみ」のパターン - PatternContinueReturnMinimal は「Continue + Early Return」の合成形 - 将来の拡張時に混乱を避けるため、今のうちに分離 テスト結果: - lib tests: 993 passed (回帰なし) - normalized_dev tests: 61 passed / 1 failed (ベースライン維持) Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -25,6 +25,9 @@ pub enum ShapeCapabilityKind {
|
|||||||
/// P4 Continue (skip whitespace) family
|
/// P4 Continue (skip whitespace) family
|
||||||
P4ContinueSkipWs,
|
P4ContinueSkipWs,
|
||||||
|
|
||||||
|
/// P4 Continue + Early Return family (Phase 89)
|
||||||
|
P4ContinueEarlyReturn,
|
||||||
|
|
||||||
/// Selfhost P2 core (token scan)
|
/// Selfhost P2 core (token scan)
|
||||||
SelfhostP2Core,
|
SelfhostP2Core,
|
||||||
|
|
||||||
@ -220,8 +223,8 @@ pub fn capability_for_shape(shape: &NormalizedDevShape) -> ShapeCapability {
|
|||||||
// Phase 54: selfhost P2/P3 shape growth
|
// Phase 54: selfhost P2/P3 shape growth
|
||||||
SelfhostVerifySchemaP2 => SelfhostP2Core,
|
SelfhostVerifySchemaP2 => SelfhostP2Core,
|
||||||
SelfhostDetectFormatP3 => SelfhostP3IfSum,
|
SelfhostDetectFormatP3 => SelfhostP3IfSum,
|
||||||
// Phase 89: Continue + Early Return pattern (dev-only, maps to P4 family)
|
// Phase 89: Continue + Early Return pattern (dev-only, dedicated capability)
|
||||||
PatternContinueReturnMinimal => P4ContinueSkipWs,
|
PatternContinueReturnMinimal => P4ContinueEarlyReturn,
|
||||||
};
|
};
|
||||||
|
|
||||||
ShapeCapability::new(kind)
|
ShapeCapability::new(kind)
|
||||||
@ -271,6 +274,7 @@ pub fn is_p2_core_capability(cap: &ShapeCapability) -> bool {
|
|||||||
| P2MidParseNumber
|
| P2MidParseNumber
|
||||||
| P3IfSum
|
| P3IfSum
|
||||||
| P4ContinueSkipWs
|
| P4ContinueSkipWs
|
||||||
|
| P4ContinueEarlyReturn
|
||||||
| SelfhostP2Core
|
| SelfhostP2Core
|
||||||
| SelfhostP3IfSum
|
| SelfhostP3IfSum
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user