@@ -1882,6 +1882,24 @@ open class SyntaxVisitor {
1882
1882
open func visitPost( _ node: KeyPathExprSyntax ) {
1883
1883
}
1884
1884
1885
+ /// Visiting `KeyPathMethodComponentSyntax` specifically.
1886
+ /// - Parameter node: the node we are visiting.
1887
+ /// - Returns: how should we continue visiting.
1888
+ #if compiler(>=5.8)
1889
+ @_spi ( ExperimentalLanguageFeatures)
1890
+ #endif
1891
+ open func visit( _ node: KeyPathMethodComponentSyntax ) -> SyntaxVisitorContinueKind {
1892
+ return . visitChildren
1893
+ }
1894
+
1895
+ /// The function called after visiting `KeyPathMethodComponentSyntax` and its descendants.
1896
+ /// - node: the node we just finished visiting.
1897
+ #if compiler(>=5.8)
1898
+ @_spi ( ExperimentalLanguageFeatures)
1899
+ #endif
1900
+ open func visitPost( _ node: KeyPathMethodComponentSyntax ) {
1901
+ }
1902
+
1885
1903
/// Visiting ``KeyPathOptionalComponentSyntax`` specifically.
1886
1904
/// - Parameter node: the node we are visiting.
1887
1905
/// - Returns: how should we continue visiting.
@@ -4739,6 +4757,14 @@ open class SyntaxVisitor {
4739
4757
visitPost ( KeyPathExprSyntax ( unsafeCasting: node) )
4740
4758
}
4741
4759
4760
+ @inline ( never)
4761
+ private func visitKeyPathMethodComponentSyntaxImpl( _ node: Syntax ) {
4762
+ if visit ( KeyPathMethodComponentSyntax ( unsafeCasting: node) ) == . visitChildren {
4763
+ visitChildren ( node)
4764
+ }
4765
+ visitPost ( KeyPathMethodComponentSyntax ( unsafeCasting: node) )
4766
+ }
4767
+
4742
4768
@inline ( never)
4743
4769
private func visitKeyPathOptionalComponentSyntaxImpl( _ node: Syntax ) {
4744
4770
if visit ( KeyPathOptionalComponentSyntax ( unsafeCasting: node) ) == . visitChildren {
@@ -6129,6 +6155,8 @@ open class SyntaxVisitor {
6129
6155
return self . visitKeyPathComponentSyntaxImpl ( _: )
6130
6156
case . keyPathExpr:
6131
6157
return self . visitKeyPathExprSyntaxImpl ( _: )
6158
+ case . keyPathMethodComponent:
6159
+ return self . visitKeyPathMethodComponentSyntaxImpl ( _: )
6132
6160
case . keyPathOptionalComponent:
6133
6161
return self . visitKeyPathOptionalComponentSyntaxImpl ( _: )
6134
6162
case . keyPathPropertyComponent:
@@ -6709,6 +6737,8 @@ open class SyntaxVisitor {
6709
6737
self . visitKeyPathComponentSyntaxImpl ( node)
6710
6738
case . keyPathExpr:
6711
6739
self . visitKeyPathExprSyntaxImpl ( node)
6740
+ case . keyPathMethodComponent:
6741
+ self . visitKeyPathMethodComponentSyntaxImpl ( node)
6712
6742
case . keyPathOptionalComponent:
6713
6743
self . visitKeyPathOptionalComponentSyntaxImpl ( node)
6714
6744
case . keyPathPropertyComponent:
0 commit comments