Skip to content

Commit

Permalink
Add arena to syntax nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdv committed Aug 17, 2023
1 parent 1060677 commit d2d2ae3
Show file tree
Hide file tree
Showing 10 changed files with 1,135 additions and 679 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ extension LayoutNode {

FunctionParameterSyntax("trailingTrivia: Trivia? = nil")
.with(\.leadingTrivia, .newline)

FunctionParameterSyntax("arena: __shared SyntaxArena = SyntaxArena()")
.with(\.leadingTrivia, .newline)
}

return """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ let renamedChildrenCompatibilityFile = try! SourceFileSyntax(leadingTrivia: copy
}
}
LabeledExprSyntax(label: "trailingTrivia", expression: ExprSyntax("trailingTrivia"))
LabeledExprSyntax(label: "arena", expression: ExprSyntax("arena"))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func syntaxNode(emitKind: SyntaxNodeKind) -> SourceFileSyntax {
calledExpression: ExprSyntax("withExtendedLifetime"),
leftParen: .leftParenToken(),
arguments: LabeledExprListSyntax {
LabeledExprSyntax(expression: ExprSyntax("(SyntaxArena(), (\(parameters)))"))
LabeledExprSyntax(expression: ExprSyntax("(arena, (\(parameters)))"))
},
rightParen: .rightParenToken(),
trailingClosure: ClosureExprSyntax(signature: closureSignature) {
Expand Down
Loading

0 comments on commit d2d2ae3

Please sign in to comment.