Skip to content

Commit 261f857

Browse files
committed
Remove IdentifierExpr initializers because Strings are convertible to IdentifierExpr
1 parent 75c1d5f commit 261f857

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/generate-swift-syntax-builder/Templates/TokenFile.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ let tokenFile = SourceFile {
6565
SequenceExpr {
6666
MemberAccessExpr(base: "self", name: "tokenSyntax")
6767
AssignmentExpr()
68-
IdentifierExpr("tokenSyntax")
68+
"tokenSyntax"
6969
}
7070
}
7171

@@ -90,7 +90,7 @@ let tokenFile = SourceFile {
9090
TupleExprElement(
9191
label: "tokenSyntax",
9292
expression: FunctionCallExpr(MemberAccessExpr(base: "tokenSyntax", name: "with\(leadingTrailing)Trivia")) {
93-
TupleExprElement(expression: IdentifierExpr("trivia"))
93+
TupleExprElement(expression: "trivia")
9494
}
9595
)
9696
}
@@ -106,7 +106,7 @@ let tokenFile = SourceFile {
106106
output: "TokenSyntax"
107107
)
108108
) {
109-
IdentifierExpr("tokenSyntax")
109+
"tokenSyntax"
110110
}
111111

112112
FunctionDecl(
@@ -125,7 +125,7 @@ let tokenFile = SourceFile {
125125
)
126126
) {
127127
FunctionCallExpr("Syntax") {
128-
TupleExprElement(expression: IdentifierExpr("tokenSyntax"))
128+
TupleExprElement(expression: "tokenSyntax")
129129
}
130130
}
131131

0 commit comments

Comments
 (0)