File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Sources/SwiftSyntaxBuilderGeneration Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ import Foundation
14
14
15
15
extension StringProtocol {
16
16
var withFirstCharacterLowercased : String { prefix ( 1 ) . lowercased ( ) + dropFirst( ) }
17
+ var backticked : String { " ` \( replacingOccurrences ( of: " ` " , with: " " ) ) ` " }
17
18
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ let tokensFile = SourceFile {
38
38
FunctionCallExpr ( MemberAccessExpr ( base: " SyntaxFactory " , name: " make \( token. name) Keyword " ) )
39
39
}
40
40
41
- createTokenSyntaxPatternBinding ( " ` \( token. name. withFirstCharacterLowercased) ` " , accessor: accessor)
41
+ createTokenSyntaxPatternBinding ( token. name. withFirstCharacterLowercased. backticked , accessor: accessor)
42
42
}
43
43
} else if let text = token. text {
44
44
VariableDecl (
@@ -69,7 +69,7 @@ let tokensFile = SourceFile {
69
69
70
70
FunctionDecl (
71
71
modifiers: [ TokenSyntax . static] ,
72
- identifier: . identifier( " ` \( token. name. withFirstCharacterLowercased) ` " ) ,
72
+ identifier: . identifier( token. name. withFirstCharacterLowercased. backticked ) ,
73
73
signature: signature
74
74
) {
75
75
FunctionCallExpr ( MemberAccessExpr ( base: " SyntaxFactory " , name: " make \( token. name) " ) ) {
You can’t perform that action at this time.
0 commit comments