Skip to content

Commit 9a903fc

Browse files
authored
Update Types.swift
1 parent df24b03 commit 9a903fc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/ASTGen/Sources/ASTGen/Types.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import CASTBridging
2+
import CBasicBridging
23
import SwiftParser
34
import SwiftSyntax
45

@@ -8,7 +9,7 @@ extension ASTGenVisitor {
89

910
var text = node.name.text
1011
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))
1213
}
1314

1415
guard let generics = node.genericArgumentClause else {
@@ -38,7 +39,7 @@ extension ASTGenVisitor {
3839

3940
var nameText = nameToken.text
4041
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))
4243
}
4344
let nameLoc = self.base.advanced(by: nameToken.position.utf8Offset).raw
4445

@@ -175,12 +176,12 @@ extension ASTGenVisitor {
175176
for element in elementList {
176177
var nameText = element.name?.text
177178
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))
179180
}
180181
let nameLoc = element.name.map { self.base.advanced(by: $0.position.utf8Offset).raw }
181182
var secondNameText = element.secondName?.text
182183
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))
184185
}
185186
let secondNameLoc = element.secondName.map {
186187
self.base.advanced(by: $0.position.utf8Offset).raw

0 commit comments

Comments
 (0)