1
1
import CASTBridging
2
+ import CBasicBridging
2
3
import SwiftParser
3
4
import SwiftSyntax
4
5
@@ -8,7 +9,7 @@ extension ASTGenVisitor {
8
9
9
10
var text = node. name. text
10
11
let id = text. withUTF8 { buf in
11
- return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, buf. count)
12
+ return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, SwiftInt ( buf. count) )
12
13
}
13
14
14
15
guard let generics = node. genericArgumentClause else {
@@ -38,7 +39,7 @@ extension ASTGenVisitor {
38
39
39
40
var nameText = nameToken. text
40
41
let name = nameText. withUTF8 { buf in
41
- return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, buf. count)
42
+ return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, SwiftInt ( buf. count) )
42
43
}
43
44
let nameLoc = self . base. advanced ( by: nameToken. position. utf8Offset) . raw
44
45
@@ -175,12 +176,12 @@ extension ASTGenVisitor {
175
176
for element in elementList {
176
177
var nameText = element. name? . text
177
178
let name = nameText? . withUTF8 { buf in
178
- return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, buf. count)
179
+ return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, SwiftInt ( buf. count) )
179
180
}
180
181
let nameLoc = element. name. map { self . base. advanced ( by: $0. position. utf8Offset) . raw }
181
182
var secondNameText = element. secondName? . text
182
183
let secondName = secondNameText? . withUTF8 { buf in
183
- return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, buf. count)
184
+ return SwiftASTContext_getIdentifier ( ctx, buf. baseAddress, SwiftInt ( buf. count) )
184
185
}
185
186
let secondNameLoc = element. secondName. map {
186
187
self . base. advanced ( by: $0. position. utf8Offset) . raw
0 commit comments