@@ -19,13 +19,13 @@ final class DeclarationVisitor: PeripherySyntaxVisitor {
1919 inheritedTypeLocations: Set < SourceLocation > ,
2020 genericParameterLocations: Set < SourceLocation > ,
2121 genericConformanceRequirementLocations: Set < SourceLocation > ,
22- ifLetShorthandIdentifiers : Set < String >
22+ letShorthandIdentifiers : Set < String >
2323 )
2424
2525 private let sourceLocationBuilder : SourceLocationBuilder
2626 private let typeSyntaxInspector : TypeSyntaxInspector
2727 private( set) var results : [ Result ] = [ ]
28- private var ifLetShorthandIdentifiers : Set < String > = [ ]
28+ private var letShorthandIdentifiers : Set < String > = [ ]
2929 private var functionDeclStackDepth = 0
3030
3131 var resultsByLocation : [ SourceLocation : Result ] {
@@ -267,7 +267,7 @@ final class DeclarationVisitor: PeripherySyntaxVisitor {
267267 let parentStmt = node. parent? . parent? . parent,
268268 ( parentStmt. is ( IfStmtSyntax . self) || parentStmt. is ( GuardStmtSyntax . self) )
269269 else { return }
270- ifLetShorthandIdentifiers . insert ( identifier. text)
270+ letShorthandIdentifiers . insert ( identifier. text)
271271 }
272272
273273 // MARK: - Private
@@ -290,13 +290,13 @@ final class DeclarationVisitor: PeripherySyntaxVisitor {
290290 AttributeSyntax ( $0) ? . attributeName. text ?? CustomAttributeSyntax ( $0) ? . attributeName. firstToken? . text
291291 } ?? [ ]
292292 let location = sourceLocationBuilder. location ( at: position)
293- var ifLetShorthandIdentifiers = Set < String > ( )
293+ var letShorthandIdentifiers = Set < String > ( )
294294
295- // Only associate if- let shorthand identifiers in nested functions with the top-most
295+ // Only associate let shorthand identifiers in nested functions with the top-most
296296 // function.
297297 if functionDeclStackDepth == 0 {
298- ifLetShorthandIdentifiers = self . ifLetShorthandIdentifiers
299- self . ifLetShorthandIdentifiers . removeAll ( )
298+ letShorthandIdentifiers = self . letShorthandIdentifiers
299+ self . letShorthandIdentifiers . removeAll ( )
300300 }
301301
302302 results. append ( (
@@ -312,7 +312,7 @@ final class DeclarationVisitor: PeripherySyntaxVisitor {
312312 typeLocations ( for: inheritanceClause) ,
313313 typeLocations ( for: genericParameterClause) ,
314314 typeLocations ( for: genericWhereClause) ,
315- ifLetShorthandIdentifiers
315+ letShorthandIdentifiers
316316 ) )
317317 }
318318
0 commit comments