Skip to content

Commit c95b6c4

Browse files
committed
[ASTGen] Fix integer and string literal mapping
1 parent f516223 commit c95b6c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/ASTGen/Sources/ASTGen/Literals.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ extension ASTGenVisitor {
88
let loc = self.base.advanced(by: node.position.utf8Offset).raw
99
var segment = node.segments.first!.as(StringSegmentSyntax.self)!.content.text
1010
return segment.withUTF8 { buf in
11-
let id = SwiftASTContext_getIdentifier(ctx, buf.baseAddress, buf.count)
12-
return SwiftStringLiteralExpr_create(ctx, id, buf.count, loc)
11+
return SwiftStringLiteralExpr_create(ctx, buf.baseAddress, buf.count, loc)
1312
}
1413
}
1514

1615
public func visit(_ node: IntegerLiteralExprSyntax) -> UnsafeMutableRawPointer {
1716
let loc = self.base.advanced(by: node.position.utf8Offset).raw
1817
var segment = node.digits.text
1918
return segment.withUTF8 { buf in
20-
let id = SwiftASTContext_getIdentifier(ctx, buf.baseAddress, buf.count)
21-
return SwiftIntegerLiteralExpr_create(ctx, id, buf.count, loc)
19+
return SwiftIntegerLiteralExpr_create(ctx, buf.baseAddress, buf.count, loc)
2220
}
2321
}
2422

0 commit comments

Comments
 (0)