File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ struct RawSyntaxChildren: BidirectionalCollection {
222
222
let offset = startIndex. offset + UInt32( parent. totalLength. utf8Length)
223
223
let indexInParent = startIndex. indexInParent + UInt32( parentLayoutView. children. count)
224
224
let indexInTree = startIndex. indexInTree. indexInTree + UInt32( parent. totalNodes) - 1
225
- let syntaxIndexInTree = SyntaxIndexInTree ( indexInTree: indexInTree )
225
+ let syntaxIndexInTree = SyntaxIndexInTree ( indexInTree)
226
226
let materialized = SyntaxChildrenIndex (
227
227
offset: offset,
228
228
indexInParent: indexInParent,
Original file line number Diff line number Diff line change 15
15
public struct SyntaxIndexInTree : Comparable , Hashable {
16
16
let indexInTree : UInt32
17
17
18
- static var zero : SyntaxIndexInTree = SyntaxIndexInTree ( indexInTree : 0 )
18
+ static var zero : SyntaxIndexInTree = SyntaxIndexInTree ( 0 )
19
19
20
20
/// Assuming that this index points to the start of ``Raw``, so that it points
21
21
/// to the next sibling of ``Raw``.
22
22
func advancedBy( _ raw: RawSyntax ? ) -> SyntaxIndexInTree {
23
23
let newIndexInTree = self . indexInTree + UInt32( truncatingIfNeeded: raw? . totalNodes ?? 0 )
24
- return . init( indexInTree : newIndexInTree)
24
+ return . init( newIndexInTree)
25
25
}
26
26
27
27
/// Assuming that this index points to the next sibling of ``Raw``, reverse it
28
28
/// so that it points to the start of ``Raw``.
29
29
func reversedBy( _ raw: RawSyntax ? ) -> SyntaxIndexInTree {
30
30
let newIndexInTree = self . indexInTree - UInt32( truncatingIfNeeded: raw? . totalNodes ?? 0 )
31
- return . init( indexInTree : newIndexInTree)
31
+ return . init( newIndexInTree)
32
32
}
33
33
34
34
func advancedToFirstChild( ) -> SyntaxIndexInTree {
35
35
let newIndexInTree = self . indexInTree + 1
36
- return . init( indexInTree : newIndexInTree)
36
+ return . init( newIndexInTree)
37
37
}
38
38
39
- init ( indexInTree: UInt32 ) {
39
+ init ( _ indexInTree: UInt32 ) {
40
40
self . indexInTree = indexInTree
41
41
}
42
42
You can’t perform that action at this time.
0 commit comments