@@ -47,22 +47,22 @@ public struct SyntaxIdentifier: Comparable, Hashable, Sendable {
47
47
/// `raw`.
48
48
func advancedBy( _ raw: RawSyntax ? ) -> SyntaxIndexInTree {
49
49
let newIndexInTree = self . indexInTree + UInt32( truncatingIfNeeded: raw? . totalNodes ?? 0 )
50
- return . init( indexInTree : newIndexInTree)
50
+ return . init( newIndexInTree)
51
51
}
52
52
53
53
/// Assuming that this index points to the next sibling of `raw`, reverse it so that it points to the start of
54
54
/// `raw`.
55
55
func reversedBy( _ raw: RawSyntax ? ) -> SyntaxIndexInTree {
56
56
let newIndexInTree = self . indexInTree - UInt32( truncatingIfNeeded: raw? . totalNodes ?? 0 )
57
- return . init( indexInTree : newIndexInTree)
57
+ return . init( newIndexInTree)
58
58
}
59
59
60
60
func advancedToFirstChild( ) -> SyntaxIndexInTree {
61
61
let newIndexInTree = self . indexInTree + 1
62
- return . init( indexInTree : newIndexInTree)
62
+ return . init( newIndexInTree)
63
63
}
64
64
65
- init ( indexInTree: UInt32 ) {
65
+ init ( _ indexInTree: UInt32 ) {
66
66
self . indexInTree = indexInTree
67
67
}
68
68
@@ -109,7 +109,7 @@ public struct SyntaxIdentifier: Comparable, Hashable, Sendable {
109
109
static func forRoot( _ raw: RawSyntax ) -> SyntaxIdentifier {
110
110
return SyntaxIdentifier (
111
111
rootId: Self . rootId ( of: raw) ,
112
- indexInTree: SyntaxIndexInTree ( indexInTree : 0 )
112
+ indexInTree: SyntaxIndexInTree ( 0 )
113
113
)
114
114
}
115
115
@@ -133,7 +133,7 @@ public struct SyntaxIdentifier: Comparable, Hashable, Sendable {
133
133
guard !root. hasParent else {
134
134
return nil
135
135
}
136
- guard indexInTree. indexInTree < SyntaxIndexInTree ( indexInTree : 0 ) . advancedBy ( root. raw) . indexInTree else {
136
+ guard indexInTree. indexInTree < SyntaxIndexInTree ( 0 ) . advancedBy ( root. raw) . indexInTree else {
137
137
return nil
138
138
}
139
139
0 commit comments