Skip to content

Commit 4321d0f

Browse files
committed
Remove all remaining use of raw: interpolations
1 parent 81d8f35 commit 4321d0f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/RawSyntaxNodesFile.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ let rawSyntaxNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
172172
}
173173

174174
if let node = node.collectionNode {
175-
let element = node.elementChoices.only != nil ? "\(node.elementChoices.only!.rawType)" : "Element"
175+
let element = node.elementChoices.only != nil ? node.elementChoices.only!.rawType : "Element"
176176
DeclSyntax(
177177
"""
178-
public init(elements: [\(raw: element)], arena: __shared SyntaxArena) {
178+
public init(elements: [\(element)], arena: __shared SyntaxArena) {
179179
let raw = RawSyntax.makeLayout(
180180
kind: .\(node.varOrCaseName), uninitializedCount: elements.count, arena: arena) { layout in
181181
guard var ptr = layout.baseAddress else { return }

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodesFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func syntaxNode(emitKind: SyntaxNodeKind) -> SourceFileSyntax {
207207
/// - returns: A copy of the receiver with the provided `\(raw: childElt)`
208208
/// appended to its `\(child.varOrCaseName)` collection.
209209
@available(*, deprecated, message: "Use node.\(child.varOrCaseName).append(newElement) instead")
210-
public func add\(raw: childElt)(_ element: \(raw: childEltType)) -> \(node.kind.syntaxType) {
210+
public func add\(raw: childElt)(_ element: \(childEltType)) -> \(node.kind.syntaxType) {
211211
var collection: RawSyntax
212212
let arena = SyntaxArena()
213213
if let col = raw.layoutView!.children[\(raw: index)] {

0 commit comments

Comments
 (0)