We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b81cb50 commit 6855ca7Copy full SHA for 6855ca7
lib/ASTGen/Sources/ASTGen/Stmts.swift
@@ -5,11 +5,12 @@ import SwiftSyntax
5
extension ASTGenVisitor {
6
public func visit(_ node: CodeBlockSyntax) -> ASTNode {
7
let statements = node.statements.map(self.visit).map { $0.bridged() }
8
- let loc = self.base.advanced(by: node.position.utf8Offset).raw
+ let startLoc = self.base.advanced(by: node.position.utf8Offset).raw
9
+ let endLoc = self.base.advanced(by: node.endPosition.utf8Offset).raw
10
11
return .stmt(
12
statements.withBridgedArrayRef { ref in
- BraceStmt_create(ctx, loc, ref, loc)
13
+ BraceStmt_create(ctx, startLoc, ref, endLoc)
14
})
15
}
16
0 commit comments