@@ -15,27 +15,27 @@ import SwiftSyntax
1515
1616public enum LexicalScopes {
1717 /// Given syntax node position, returns all available labeled statements.
18- public static func lookupLabeledStmts( at syntax: SyntaxProtocol ) -> [ LabeledStmtSyntax ] {
18+ @ _spi ( Compiler ) @ _spi ( Testing ) public static func lookupLabeledStmts( at syntax: SyntaxProtocol ) -> [ LabeledStmtSyntax ] {
1919 guard let scope = syntax. scope else { return [ ] }
2020 return scope. lookupLabeledStmts ( at: syntax)
2121 }
2222
2323 /// Given syntax node position, returns the current switch case and it's fallthrough destination.
24- public static func lookupFallthroughSourceAndDest(
24+ @ _spi ( Compiler ) @ _spi ( Testing ) public static func lookupFallthroughSourceAndDest(
2525 at syntax: SyntaxProtocol
2626 ) -> ( source: SwitchCaseSyntax ? , destination: SwitchCaseSyntax ? ) {
2727 guard let scope = syntax. scope else { return ( nil , nil ) }
2828 return scope. lookupFallthroughSourceAndDestination ( at: syntax)
2929 }
3030
3131 /// Given syntax node position, returns the closest ancestor catch node.
32- public static func lookupCatchNode( at syntax: SyntaxProtocol ) -> Syntax ? {
32+ @ _spi ( Compiler ) @ _spi ( Testing ) public static func lookupCatchNode( at syntax: SyntaxProtocol ) -> Syntax ? {
3333 guard let scope = syntax. scope else { return nil }
3434 return scope. lookupCatchNode ( at: Syntax ( syntax) )
3535 }
3636
3737 /// Given name and syntax node position, return referenced declaration.
38- public static func lookupDeclarationFor( name: String , at syntax: SyntaxProtocol ) -> Syntax ? {
38+ @ _spi ( Compiler ) @ _spi ( Testing ) public static func lookupDeclarationFor( name: String , at syntax: SyntaxProtocol ) -> Syntax ? {
3939 guard let scope = syntax. scope else { return nil }
4040 return scope. getDeclarationFor ( name: name, at: syntax)
4141 }
0 commit comments