@@ -63,35 +63,35 @@ extension SyntaxClassification {
63
63
/// - childKind: The node syntax kind.
64
64
/// - Returns: A pair of classification and whether it is "forced", or nil if
65
65
/// no classification is attached.
66
- internal static func classify( _ keyPath : AnyKeyPath ) -> ( SyntaxClassification , Bool ) ? {
67
- switch keyPath {
68
- case \ AttributeSyntax . attributeName:
66
+ internal static func classify( _ property : SyntaxLayoutProperty ) -> ( SyntaxClassification , Bool ) ? {
67
+ switch property {
68
+ case AttributeSyntax . layout [ . attributeName] :
69
69
return ( . attribute, true )
70
- case \ PlatformVersionItemSyntax . platformVersion:
70
+ case PlatformVersionItemSyntax . layout [ . platformVersion] :
71
71
return ( . keyword, false )
72
- case \ AvailabilityVersionRestrictionSyntax . platform:
72
+ case PlatformVersionSyntax . layout [ . platform] :
73
73
return ( . keyword, false )
74
- case \ DeclModifierSyntax . name:
74
+ case DeclModifierSyntax . layout [ . name] :
75
75
return ( . attribute, false )
76
- case \ IfConfigClauseSyntax . poundKeyword:
76
+ case IfConfigClauseSyntax . layout [ . poundKeyword] :
77
77
return ( . ifConfigDirective, false )
78
- case \ IfConfigClauseSyntax . condition:
78
+ case IfConfigClauseSyntax . layout [ . condition] :
79
79
return ( . ifConfigDirective, false )
80
- case \ IfConfigDeclSyntax . poundEndif:
80
+ case IfConfigDeclSyntax . layout [ . poundEndif] :
81
81
return ( . ifConfigDirective, false )
82
- case \ MemberTypeIdentifierSyntax . name:
82
+ case MemberTypeSyntax . layout [ . name] :
83
83
return ( . type, false )
84
- case \ OperatorDeclSyntax . name:
84
+ case OperatorDeclSyntax . layout [ . name] :
85
85
return ( . operator, false )
86
- case \ PrecedenceGroupAssociativitySyntax . associativityLabel:
86
+ case PrecedenceGroupAssociativitySyntax . layout [ . associativityLabel] :
87
87
return ( . keyword, false )
88
- case \ PrecedenceGroupRelationSyntax . higherThanOrLowerThanLabel:
88
+ case PrecedenceGroupRelationSyntax . layout [ . higherThanOrLowerThanLabel] :
89
89
return ( . keyword, false )
90
- case \ SimpleTypeIdentifierSyntax . name:
90
+ case IdentifierTypeSyntax . layout [ . name] :
91
91
return ( . type, false )
92
- case \ FunctionParameterSyntax . firstName:
92
+ case FunctionParameterSyntax . layout [ . firstName] :
93
93
return ( . argumentLabel, false )
94
- case \ LabeledExprSyntax . label:
94
+ case LabeledExprSyntax . layout [ . label] :
95
95
return ( . argumentLabel, false )
96
96
default :
97
97
return nil
0 commit comments